Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
implementation "net.fabricmc:fabric-loader:${project.loader_version}"

implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
}

processResources {
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=26.1
loader_version=0.18.4
loom_version=1.15-SNAPSHOT
minecraft_version=26.2
loader_version=0.19.3
loom_version=1.17-SNAPSHOT

# Fabric API
fabric_version=0.144.0+26.1
fabric_api_version=0.152.1+26.2

# Mod Properties
mod_version=1.2.5
mod_version=1.2.6
maven_group=yungando.strippingtoggle
archives_base_name=strippingtoggle
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/yungando/strippingtoggle/StrippingToggle.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void onInitializeClient() {
toggleStripping = KeyMappingHelper.registerKeyMapping(new KeyMapping(
"key.yungando.strippingtoggle.toggleStripping", GLFW.GLFW_KEY_B, StrippingToggleKeyCategory));

ClientTickEvents.END_CLIENT_TICK.register(client -> {
ClientTickEvents.END_CLIENT_TICK.register(_ -> {
if (toggleStripping.consumeClick())
StrippingToggle.toggleStripping();
});
Expand All @@ -90,7 +90,7 @@ public void renderTexture(GuiGraphicsExtractor drawContext, DeltaTracker tickCou

Minecraft client = Minecraft.getInstance();

if (client.options.hideGui)
if (client.gui.hud.isHidden())
return;

int textureWidth = 32;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
@Mixin(MultiPlayerGameMode.class)
public class MultiPlayerGameModeMixin {
@Inject(method = "useItemOn", at = @At("HEAD"), cancellable = true)
private void StrippingToggle$cancelBlockInteraction(LocalPlayer player, InteractionHand hand, BlockHitResult hitResult, CallbackInfoReturnable<InteractionResult> cir) {
private void StrippingToggle$cancelBlockInteraction(LocalPlayer player, InteractionHand hand, BlockHitResult blockHit, CallbackInfoReturnable<InteractionResult> cir) {
if (!StrippingToggle.strippingEnabled) {
Item heldItem = player.getItemInHand(hand).getItem();
Block interactionBlock = player.level().getBlockState(hitResult.getBlockPos()).getBlock();
Block interactionBlock = player.level().getBlockState(blockHit.getBlockPos()).getBlock();

if (heldItem instanceof AxeItem && StrippingToggle.canBeAxeStripped(interactionBlock)) {
cir.setReturnValue(InteractionResult.PASS);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"strippingtoggle.mixins.json"
],
"depends": {
"fabricloader": ">=0.18.4",
"minecraft": ">=26.1",
"fabricloader": ">=0.19.3",
"minecraft": ">=26.2",
"java": ">=25",
"fabric-api": "*"
}
Expand Down
Loading