Inspired by 2020's April Fools' 20w14infinite Snapshot, this mod brings endless randomly generated dimensions into Minecraft.

More 1.21.8 rendering fixes

+102 -39
+5 -20
CHANGELOG-LATEST.md
··· 1 - ### Added 2 - - Backported all content from Infinite Dimensions v2.5 to 1.20.1. Primarily, this includes: 3 - - A new amendments system, which allows for easy handling of modular config files - changing weights of any entries in any randomization pools or eliminating them altogether, based on a robust system of selectors. Default amendments bundled with the mod resolve some major earlier incompatibilities (aether, alex's caves, oritech) and it is recommended to have [Mod Menu](https://modrinth.com/mod/modmenu) and [Cloth Config](https://modrinth.com/mod/cloth-config) installed if you want to add more of them. 4 - - Random lakes are back, ocean vegetation is no longer hardcoded, fossils and Bonus Chests are introduced (rarity of both under review). 5 - - A `/warp random` command that does what you'd expect (good for datapacks that randomly warp you every `n` minutes) 6 - - A new "safe mode" setting is introduced that disables all block entities from being used in future dimensions for terrain generation - may be useful in heavily modded environments. 7 - - Every end gateway in random dimensions now teleports to a different point. 8 - - Coral no longer decays in random dimensions. 9 - - Ported to 1.21.8. This port is in beta, please note the following: 10 - - This port is experimental and some features may not work as intended, notably custom skies and shaders, including the iridesecence shaders. Fixes for these are planned. 11 - - Item and entity rendering *should* be working as intended despite major rewrites, please report if you find this to not be the case. 12 - - Create integration has been modified to support [Create Fly](<https://modrinth.com/mod/create-fly>) and EMI integration has been changed to support [EIV](<https://modrinth.com/mod/eiv>). 13 - - This version will likely be dropped in the future in favour of 26.1. 14 - 15 - ### Changed 16 - - Major internal refactors to allow Infinite Dimensions to build for multiple versions of Minecraft at once. 17 - - Required elements of Forgified Fabric API are now bundled on 1.20.1. All versions now only depend on Architectury API. 18 - 19 1 ### Fixed 20 - - Infinite Dimensions now gracefully handles mods with invalid block entities instead of allowing Minecraft to crash with from invalid player data. 21 - - Crash from Coral Blocks attempting to generate too early. 2 + - Star and sky rendering on 1.21.8 3 + - Iridesence tinting in EIV. 4 + - Crash rendering Chaos Pawns. 5 + - Crash on dedicated NeoForge servers. 6 + - Crash from `alphatree` on NeoForge.
+21
CHANGELOG.md
··· 1 + ### Added 2 + - Backported all content from Infinite Dimensions v2.5 to 1.20.1. Primarily, this includes: 3 + - A new amendments system, which allows for easy handling of modular config files - changing weights of any entries in any randomization pools or eliminating them altogether, based on a robust system of selectors. Default amendments bundled with the mod resolve some major earlier incompatibilities (aether, alex's caves, oritech) and it is recommended to have [Mod Menu](https://modrinth.com/mod/modmenu) and [Cloth Config](https://modrinth.com/mod/cloth-config) installed if you want to add more of them. 4 + - Random lakes are back, ocean vegetation is no longer hardcoded, fossils and Bonus Chests are introduced (rarity of both under review). 5 + - A `/warp random` command that does what you'd expect (good for datapacks that randomly warp you every `n` minutes) 6 + - A new "safe mode" setting is introduced that disables all block entities from being used in future dimensions for terrain generation - may be useful in heavily modded environments. 7 + - Every end gateway in random dimensions now teleports to a different point. 8 + - Coral no longer decays in random dimensions. 9 + - Ported to 1.21.8. This port is in beta, please note the following: 10 + - This port is experimental and some features may not work as intended, notably custom skies and shaders, including the iridesecence shaders. Fixes for these are planned. 11 + - Item and entity rendering *should* be working as intended despite major rewrites, please report if you find this to not be the case. 12 + - Create integration has been modified to support [Create Fly](<https://modrinth.com/mod/create-fly>) and EMI integration has been changed to support [EIV](<https://modrinth.com/mod/eiv>). 13 + - This version will likely be dropped in the future in favour of 26.1. 14 + 15 + ### Changed 16 + - Major internal refactors to allow Infinite Dimensions to build for multiple versions of Minecraft at once. 17 + - Required elements of Forgified Fabric API are now bundled on 1.20.1. All versions now only depend on Architectury API. 18 + 19 + ### Fixed 20 + - Infinite Dimensions now gracefully handles mods with invalid block entities instead of allowing Minecraft to crash with from invalid player data. 21 + - Crash from Coral Blocks attempting to generate too early.
+1 -1
build.forge.gradle.kts
··· 255 255 ?: emptyList() 256 256 257 257 publishMods { 258 - file = tasks.jar.map { it.archiveFile.get() } 258 + file = (tasks.named<org.gradle.jvm.tasks.Jar>("reobfJar").map { it.archiveFile.get() }) 259 259 additionalFiles.from(tasks.named<org.gradle.jvm.tasks.Jar>("sourcesJar").map { it.archiveFile.get() }) 260 260 261 261 type = STABLE
+2 -1
src/main/java/net/lerariemann/infinity/compat/eiv/iridescence_crafting/IridescenceCraftingViewType.java
··· 4 4 5 5 import de.crafty.eiv.common.api.recipe.IEivRecipeViewType; 6 6 import de.crafty.eiv.common.recipe.inventory.RecipeViewMenu; 7 + import net.lerariemann.infinity.registry.core.ModBlocks; 7 8 import net.lerariemann.infinity.registry.core.ModItems; 8 9 import net.lerariemann.infinity.util.InfinityMethods; 9 10 import net.minecraft.network.chat.Component; ··· 59 60 60 61 @Override 61 62 public List<ItemStack> getCraftReferences() { 62 - return List.of(ModItems.IRIDESCENCE_BUCKET.get().getDefaultInstance()); 63 + return List.of(ModItems.IRIDESCENCE_BUCKET.get().getDefaultInstance(), new ItemStack(ModBlocks.IRIDESCENCE.get())); 63 64 } 64 65 65 66 }
+10
src/main/java/net/lerariemann/infinity/entity/client/ChaosPawnRenderer.java
··· 27 27 public ChaosPawnRenderState createRenderState() { 28 28 return new ChaosPawnRenderState(); 29 29 } 30 + 31 + @Override 32 + public void extractRenderState(ChaosPawn entity, ChaosPawnRenderState reusedState, float partialTick) { 33 + super.extractRenderState(entity, reusedState, partialTick); 34 + reusedState.colors = entity.getColors(); 35 + reusedState.id = entity.getId(); 36 + if (entity.hasCustomName()) 37 + reusedState.customName = entity.getCustomName().getString(); 38 + } 39 + 30 40 @Override 31 41 public ResourceLocation getTextureLocation(ChaosPawnRenderState renderState) { 32 42 return TEXTURE;
+2 -8
src/main/java/net/lerariemann/infinity/entity/custom/ChaosPawn.java
··· 12 12 import net.minecraft.core.component.DataComponentMap; 13 13 import net.minecraft.core.component.DataComponents; 14 14 import net.minecraft.network.codec.ByteBufCodecs; 15 - import net.minecraft.world.entity.SpawnPlacementType; 16 15 //?} 17 16 import net.minecraft.core.registries.Registries; 18 17 import net.minecraft.nbt.CompoundTag; ··· 55 54 @ParametersAreNonnullByDefault 56 55 //?} 57 56 public class ChaosPawn extends AbstractChessFigure { 58 - public static final EntityDataAccessor<CompoundTag> colors = SynchedEntityData.defineId(ChaosPawn.class, 59 - //? if >1.21.4 { 60 - EntityDataSerializer.forValueType(ByteBufCodecs.COMPOUND_TAG) 61 - //?} else { 62 - /*EntityDataSerializers.COMPOUND_TAG 63 - *///?} 64 - ); 57 + 58 + public static final EntityDataAccessor<CompoundTag> colors = SynchedEntityData.defineId(ChaosPawn.class, EntityDataSerializers.COMPOUND_TAG); 65 59 public static final EntityDataAccessor<Integer> special_case = SynchedEntityData.defineId(ChaosPawn.class, EntityDataSerializers.INT); 66 60 67 61 public ChaosPawn(EntityType<? extends ChaosPawn> entityType, Level world) {
+51
src/main/java/net/lerariemann/infinity/mixin/eiv/FluidItemRendererMixin.java
··· 1 + package net.lerariemann.infinity.mixin.eiv; 2 + 3 + import com.llamalad7.mixinextras.injector.wrapoperation.Operation; 4 + import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; 5 + import com.llamalad7.mixinextras.sugar.Local; 6 + //? >1.21.4 7 + import de.crafty.eiv.common.extra.FluidItemSpecialRenderer; 8 + import net.lerariemann.infinity.iridescence.Iridescence; 9 + import net.lerariemann.infinity.registry.core.ModBlocks; 10 + import net.lerariemann.infinity.util.platform.InfinityPlatform; 11 + import net.minecraft.world.item.ItemStack; 12 + import org.spongepowered.asm.mixin.Mixin; 13 + import org.spongepowered.asm.mixin.Pseudo; 14 + import org.spongepowered.asm.mixin.injection.At; 15 + 16 + import java.awt.*; 17 + 18 + //? if >1.21.4 { 19 + @Pseudo 20 + @Mixin(FluidItemSpecialRenderer.class) 21 + // EIV only tints fluids if they are water. This provides the appropriate tinting to Iridescence. 22 + public class FluidItemRendererMixin { 23 + 24 + @WrapOperation(method = "render(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemDisplayContext;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;IIZ)V", at = @At(value = "INVOKE", target = "Ljava/awt/Color;getRed()I")) 25 + int fixRed(Color instance, Operation<Integer> original, @Local ItemStack stack) { 26 + if (stack.is(ModBlocks.IRIDESCENCE.get().asItem())) { 27 + return new Color(Iridescence.getTimeBasedColor()).getRed(); 28 + } 29 + return original.call(instance); 30 + } 31 + 32 + @WrapOperation(method = "render(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemDisplayContext;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;IIZ)V", at = @At(value = "INVOKE", target = "Ljava/awt/Color;getBlue()I")) 33 + int fixBlue(Color instance, Operation<Integer> original, @Local ItemStack stack) { 34 + if (stack.is(ModBlocks.IRIDESCENCE.get().asItem())) { 35 + return new Color(Iridescence.getTimeBasedColor()).getBlue(); 36 + } 37 + return original.call(instance); 38 + } 39 + 40 + @WrapOperation(method = "render(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemDisplayContext;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;IIZ)V", at = @At(value = "INVOKE", target = "Ljava/awt/Color;getGreen()I")) 41 + int fixGreen(Color instance, Operation<Integer> original, @Local ItemStack stack) { 42 + if (stack.is(ModBlocks.IRIDESCENCE.get().asItem())) { 43 + return new Color(Iridescence.getTimeBasedColor()).getGreen(); 44 + } 45 + return original.call(instance); 46 + } 47 + } 48 + //?} else { 49 + /*@Mixin(Iridescence.class) 50 + public class FluidItemRendererMixin {} 51 + *///?}
+2 -2
src/main/java/net/lerariemann/infinity/mixin/iridescence/PostEffectProcessorMixin.java
··· 1 1 package net.lerariemann.infinity.mixin.iridescence; 2 2 3 3 //? if <1.21.2 { 4 - /* 5 - import net.lerariemann.infinity.util.loading.ShaderLoader; 4 + 5 + /*import net.lerariemann.infinity.util.loading.ShaderLoader; 6 6 import net.minecraft.client.Minecraft; 7 7 import net.minecraft.client.renderer.PostPass; 8 8 import org.spongepowered.asm.mixin.Final;
+1 -1
src/main/java/net/lerariemann/infinity/util/VersionMethods.java
··· 2 2 3 3 import net.lerariemann.infinity.access.GameRendererAccess; 4 4 import net.lerariemann.infinity.registry.core.ModComponentTypes; 5 + import net.minecraft.client.Minecraft; 5 6 //? if >1.21 { 6 7 import dev.architectury.registry.registries.RegistrySupplier; 7 - import net.minecraft.client.Minecraft; 8 8 import net.minecraft.core.*; 9 9 import net.minecraft.core.component.DataComponentMap; 10 10 import net.minecraft.core.component.DataComponentType;
+1
src/main/java/net/lerariemann/infinity/util/core/NbtUtils.java
··· 115 115 *///?} 116 116 } 117 117 static int getInt(CompoundTag data, String key, int def) { 118 + if (data == null) return def; 118 119 //? if >1.21.5 { 119 120 return data.getIntOr(key, def); 120 121 //?} else {
-3
src/main/java/net/lerariemann/infinity/util/platform/neoforge/InfinityModNeoforge.java
··· 21 21 import net.minecraft.server.packs.PackType; 22 22 import net.minecraft.server.packs.repository.Pack; 23 23 import net.minecraft.server.packs.repository.PackSource; 24 - import net.neoforged.api.distmarker.Dist; 25 24 import net.neoforged.bus.api.IEventBus; 26 25 import net.neoforged.bus.api.SubscribeEvent; 27 26 import net.neoforged.fml.ModContainer; 28 27 import net.neoforged.fml.common.EventBusSubscriber; 29 28 import net.neoforged.fml.common.Mod; 30 29 import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; 31 - import net.neoforged.fml.loading.FMLEnvironment; 32 30 import net.neoforged.neoforge.event.AddPackFindersEvent; 33 31 import net.neoforged.neoforge.event.entity.RegisterSpawnPlacementsEvent; 34 32 import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent; ··· 36 34 import net.neoforged.neoforge.network.registration.PayloadRegistrar; 37 35 38 36 import static net.lerariemann.infinity.InfinityMod.MOD_ID; 39 - import static net.lerariemann.infinity.registry.var.ModPayloads.*; 40 37 41 38 @Mod(MOD_ID) 42 39 @EventBusSubscriber(modid = MOD_ID)
+2 -1
src/main/resources/accesswideners/1.21.10.accesswidener
··· 11 11 accessible method net/minecraft/world/level/block/NetherPortalBlock getDimensionTransitionFromExit (Lnet/minecraft/world/entity/Entity;Lnet/minecraft/core/BlockPos;Lnet/minecraft/BlockUtil$FoundRectangle;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/portal/TeleportTransition$PostTeleportTransition;)Lnet/minecraft/world/level/portal/TeleportTransition; 12 12 accessible method net/minecraft/world/level/levelgen/structure/Structure findGenerationPoint (Lnet/minecraft/world/level/levelgen/structure/Structure$GenerationContext;)Ljava/util/Optional; 13 13 accessible class net/minecraft/server/level/ServerPlayer$RespawnPosAngle 14 - accessible class net/minecraft/core/MappedRegistry$TagSet 14 + accessible class net/minecraft/core/MappedRegistry$TagSet 15 + accessible method net/minecraft/client/renderer/GameRenderer setPostEffect (Lnet/minecraft/resources/ResourceLocation;)V
+2 -1
src/main/resources/accesswideners/1.21.8.accesswidener
··· 11 11 accessible method net/minecraft/world/level/block/NetherPortalBlock getDimensionTransitionFromExit (Lnet/minecraft/world/entity/Entity;Lnet/minecraft/core/BlockPos;Lnet/minecraft/BlockUtil$FoundRectangle;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/portal/TeleportTransition$PostTeleportTransition;)Lnet/minecraft/world/level/portal/TeleportTransition; 12 12 accessible method net/minecraft/world/level/levelgen/structure/Structure findGenerationPoint (Lnet/minecraft/world/level/levelgen/structure/Structure$GenerationContext;)Ljava/util/Optional; 13 13 accessible class net/minecraft/server/level/ServerPlayer$RespawnPosAngle 14 - accessible class net/minecraft/core/MappedRegistry$TagSet 14 + accessible class net/minecraft/core/MappedRegistry$TagSet 15 + accessible method net/minecraft/client/renderer/GameRenderer setPostEffect (Lnet/minecraft/resources/ResourceLocation;)V
+2 -1
src/main/resources/infinity.mixins.json
··· 19 19 "core.ServerPlayerEntityMixin", 20 20 "core.SimpleRegistryMixin", 21 21 "core.StructureMixin", 22 + "eiv.FluidItemRendererMixin", 22 23 "fixes.AquifierSamplerImplMixin", 23 24 "fixes.BeeGoalMixin", 24 25 "fixes.BeeGoalMixin$BeeGoalMixin2", ··· 73 74 "iridescence.RenderSystemMixin", 74 75 "options.BackgroundRendererMixin", 75 76 "options.ClientWorldMixin", 76 - "options.GameRendererMixin", 77 77 "options.FogRendererMixin", 78 + "options.GameRendererMixin", 78 79 "options.MinecraftClientMixin", 79 80 "options.SoundSystemMixin", 80 81 "options.WorldRendererMixin",