Skip to content

Commit

Permalink
Update to Minecraft 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
kalucky0 committed Jun 19, 2024
1 parent 2e5698d commit aeb5543
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
fabric_version=0.100.3+1.21
modmenu_version=11.0.0
2 changes: 1 addition & 1 deletion src/main/java/net/immortaldevs/colorizer/ColorManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/immortaldevs/colorizer/ColorizerMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/colorizer.accesswidener
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion src/main/resources/colorizer.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"BlockMixin",
"ItemMixin",
"TexturedRenderLayersMixin",
"ChunkBuilderMixin"
"SectionBuilderMixin"
],
"injectors": {
"defaultRequire": 1
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"accessWidener": "colorizer.accesswidener",
"depends": {
"fabricloader": ">=0.15",
"minecraft": ">=1.20.4 <1.21",
"minecraft": ">=1.21 <1.22",
"java": ">=21"
}
}

0 comments on commit aeb5543

Please sign in to comment.