Skip to content

Commit

Permalink
feat: Support Minecraft 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
magicus committed Jun 13, 2024
1 parent e8a708a commit b1d3f94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ mod_version=1.2.0

# Minecraft/Java version
# Also hardcoded in fabric.mod.json and *.mixin.json
minecraft_version=1.20.5
minecraft_version=1.21
java_version=21

# Fabric versions -- check these on https://fabricmc.net/develop
# Also hardcoded in fabric.mod.json
yarn_mappings=1.20.5+build.1
loader_version=0.15.10
yarn_mappings=1.21+build.1
loader_version=0.15.11
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
import net.minecraft.client.render.RenderTickCounter;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.util.math.MathHelper;
Expand All @@ -27,7 +28,7 @@ public abstract class StatusEffectTimerMixin {

@Inject(method = "renderStatusEffectOverlay",
at = @At(value = "INVOKE", target = "Ljava/util/List;add(Ljava/lang/Object;)Z", shift = At.Shift.AFTER))
private void appendOverlayDrawing(DrawContext context, float tickDelta, CallbackInfo c,
private void appendOverlayDrawing(DrawContext context, RenderTickCounter tickCounter, CallbackInfo c,
@Local List<Runnable> list, @Local StatusEffectInstance statusEffectInstance,
@Local(ordinal = 4) int x, @Local(ordinal = 3) int y) {
list.add(() -> {
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 @@ -24,7 +24,7 @@
],

"depends": {
"minecraft": "~1.20.5",
"minecraft": "~1.21",
"fabricloader": ">=0.15.6"
}
}

0 comments on commit b1d3f94

Please sign in to comment.