diff --git a/gradle.properties b/gradle.properties index d88e833..ec43820 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,15 +4,15 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.6 -yarn_mappings=1.20.6+build.3 +minecraft_version=1.21 +yarn_mappings=1.21+build.2 loader_version=0.15.11 # Mod Properties -mod_version=1.2.1 +mod_version=1.3.0 maven_group=net.immortaldevs archives_base_name=chest-colorizer # Dependencies -fabric_version=0.99.4+1.20.6 -modmenu_version=10.0.0-beta.1 \ No newline at end of file +fabric_version=0.100.3+1.21 +modmenu_version=11.0.0 \ No newline at end of file diff --git a/src/main/java/net/immortaldevs/colorizer/ColorManager.java b/src/main/java/net/immortaldevs/colorizer/ColorManager.java index 6c55b32..26194d4 100644 --- a/src/main/java/net/immortaldevs/colorizer/ColorManager.java +++ b/src/main/java/net/immortaldevs/colorizer/ColorManager.java @@ -155,6 +155,6 @@ private static String getLevelName() { } private static SpriteIdentifier createChestTextureId(String variant) { - return new SpriteIdentifier(CHEST_ATLAS_TEXTURE, new Identifier(ColorizerMod.MOD_ID, "entity/chest/" + variant)); + return new SpriteIdentifier(CHEST_ATLAS_TEXTURE, Identifier.of(ColorizerMod.MOD_ID, "entity/chest/" + variant)); } } diff --git a/src/main/java/net/immortaldevs/colorizer/ColorizerMod.java b/src/main/java/net/immortaldevs/colorizer/ColorizerMod.java index f026405..a25f1c2 100644 --- a/src/main/java/net/immortaldevs/colorizer/ColorizerMod.java +++ b/src/main/java/net/immortaldevs/colorizer/ColorizerMod.java @@ -14,7 +14,7 @@ public class ColorizerMod implements ClientModInitializer { @Override public void onInitializeClient() { - Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "barrel"), BARREL_BLOCK); + Registry.register(Registries.BLOCK, Identifier.of(MOD_ID, "barrel"), BARREL_BLOCK); Config.load(); } } diff --git a/src/main/java/net/immortaldevs/colorizer/mixin/ChunkBuilderMixin.java b/src/main/java/net/immortaldevs/colorizer/mixin/SectionBuilderMixin.java similarity index 74% rename from src/main/java/net/immortaldevs/colorizer/mixin/ChunkBuilderMixin.java rename to src/main/java/net/immortaldevs/colorizer/mixin/SectionBuilderMixin.java index 97a8906..af62a36 100644 --- a/src/main/java/net/immortaldevs/colorizer/mixin/ChunkBuilderMixin.java +++ b/src/main/java/net/immortaldevs/colorizer/mixin/SectionBuilderMixin.java @@ -7,17 +7,17 @@ import net.minecraft.block.BarrelBlock; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; -import net.minecraft.client.render.chunk.ChunkBuilder; import net.minecraft.client.render.chunk.ChunkRendererRegion; +import net.minecraft.client.render.chunk.SectionBuilder; import net.minecraft.util.math.BlockPos; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -@Mixin(ChunkBuilder.BuiltChunk.RebuildTask.class) -public class ChunkBuilderMixin { +@Mixin(SectionBuilder.class) +public class SectionBuilderMixin { @Redirect( - method = "Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask;render(FFFLnet/minecraft/client/render/chunk/BlockBufferBuilderStorage;)Lnet/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$RenderData;", + method = "Lnet/minecraft/client/render/chunk/SectionBuilder;build(Lnet/minecraft/util/math/ChunkSectionPos;Lnet/minecraft/client/render/chunk/ChunkRendererRegion;Lcom/mojang/blaze3d/systems/VertexSorter;Lnet/minecraft/client/render/chunk/BlockBufferAllocatorStorage;)Lnet/minecraft/client/render/chunk/SectionBuilder$RenderData;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/chunk/ChunkRendererRegion;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;") ) public BlockState modifyBlockState(ChunkRendererRegion instance, BlockPos pos) { diff --git a/src/main/resources/colorizer.accesswidener b/src/main/resources/colorizer.accesswidener index df77215..3c05790 100644 --- a/src/main/resources/colorizer.accesswidener +++ b/src/main/resources/colorizer.accesswidener @@ -1,3 +1,2 @@ accessWidener v1 named -accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask accessible method net/minecraft/client/render/TexturedRenderLayers getChestTextureId (Lnet/minecraft/block/enums/ChestType;Lnet/minecraft/client/util/SpriteIdentifier;Lnet/minecraft/client/util/SpriteIdentifier;Lnet/minecraft/client/util/SpriteIdentifier;)Lnet/minecraft/client/util/SpriteIdentifier; \ No newline at end of file diff --git a/src/main/resources/colorizer.mixins.json b/src/main/resources/colorizer.mixins.json index f66f584..d934355 100644 --- a/src/main/resources/colorizer.mixins.json +++ b/src/main/resources/colorizer.mixins.json @@ -7,7 +7,7 @@ "BlockMixin", "ItemMixin", "TexturedRenderLayersMixin", - "ChunkBuilderMixin" + "SectionBuilderMixin" ], "injectors": { "defaultRequire": 1 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index c6b9717..db6e81d 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -35,7 +35,7 @@ "accessWidener": "colorizer.accesswidener", "depends": { "fabricloader": ">=0.15", - "minecraft": ">=1.20.4 <1.21", + "minecraft": ">=1.21 <1.22", "java": ">=21" } }