vanilla-fixes

Minecraft: Better than Adventure! mod that fixes some issues
git clone git://memoryshards.xyz/vanilla-fixes.git
Log | Files | Refs | README | LICENSE

commit 22867ba85328adc4e4c4935dca01b5ae1a599a10
parent 9b14e96e7597d4c5d83930c3f5a1038b121609e2
Author: Amb0s <ambos@disroot.org>
Date:   Sun, 21 Jan 2024 09:16:11 +0100

Removed block hit delay fix

Diffstat:
MREADME.md | 1-
Dsrc/main/java/turniplabs/vanillafixes/mixin/PlayerControllerMixin.java | 21---------------------
Dsrc/main/java/turniplabs/vanillafixes/mixin/ToolMaterialMixin.java | 19-------------------
3 files changed, 0 insertions(+), 41 deletions(-)

diff --git a/README.md b/README.md @@ -2,7 +2,6 @@ ## Fixes * Removed jittering -* Reduced block hit delay * Changed mod resources directory path ## Improvements diff --git a/src/main/java/turniplabs/vanillafixes/mixin/PlayerControllerMixin.java b/src/main/java/turniplabs/vanillafixes/mixin/PlayerControllerMixin.java @@ -1,21 +0,0 @@ -package turniplabs.vanillafixes.mixin; - -import net.minecraft.client.player.controller.PlayerController; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@Mixin(value = PlayerController.class, remap = false) -final class PlayerControllerMixin { - @Shadow - protected int blockHitDelay; - - @Redirect(method = "mine", at = @At(value = "FIELD", - target = "Lnet/minecraft/client/player/controller/PlayerController;blockHitDelay:I", - opcode = Opcodes.PUTFIELD, ordinal = 3)) - private void changeBlockHitDelay(PlayerController instance, int value) { - blockHitDelay = 0; - } -} diff --git a/src/main/java/turniplabs/vanillafixes/mixin/ToolMaterialMixin.java b/src/main/java/turniplabs/vanillafixes/mixin/ToolMaterialMixin.java @@ -1,19 +0,0 @@ -package turniplabs.vanillafixes.mixin; - -import net.minecraft.core.item.material.ToolMaterial; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(value = ToolMaterial.class, remap = false) -final class ToolMaterialMixin { - @Shadow - private int blockHitDelay; - - @Inject(method = "<init>", at = @At("RETURN"), require = 0) - private void changeBlockHitDelay(CallbackInfo ci) { - this.blockHitDelay = 0; - } -}