diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java index 8fd32485..cc5b724b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java @@ -26,7 +26,6 @@ import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.protocols.v1_11_1to1_12.Protocol1_11_1To1_12; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3; -import de.florianmichael.viafabricplus.fixes.data.ItemRegistryDiff; import de.florianmichael.viafabricplus.injection.access.IMouseKeyboard; import de.florianmichael.viafabricplus.protocoltranslator.ProtocolTranslator; import de.florianmichael.viafabricplus.settings.impl.DebugSettings; @@ -34,10 +33,6 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.Mouse; import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.client.network.ClientPlayerInteractionManager; -import net.minecraft.client.render.item.HeldItemRenderer; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.item.ItemStack; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import org.jetbrains.annotations.Nullable; @@ -71,23 +66,6 @@ public abstract class MixinMinecraftClient { @Final public Keyboard keyboard; - @Redirect(method = "doItemPick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerInventory;addPickBlock(Lnet/minecraft/item/ItemStack;)V")) - private void filterItem(PlayerInventory instance, ItemStack stack) { - if (ItemRegistryDiff.keepItem(stack.getItem())) { - instance.addPickBlock(stack); - } - } - - /** - * Never happens in Vanilla, this is only for {@link ItemRegistryDiff} to work - */ - @Redirect(method = "doItemPick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;clickCreativeStack(Lnet/minecraft/item/ItemStack;I)V")) - private void dontSendEmptyItem(ClientPlayerInteractionManager instance, ItemStack stack, int slotId) { - if (!stack.isEmpty()) { - instance.clickCreativeStack(stack, slotId); - } - } - @WrapWithCondition(method = "handleInputEvents", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;swingHand(Lnet/minecraft/util/Hand;)V")) private boolean disableSwing(ClientPlayerEntity instance, Hand hand) { return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_15); diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinSkeletonHorseEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinSkeletonHorseEntity.java index 5a5e0da2..351b7cc7 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinSkeletonHorseEntity.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinSkeletonHorseEntity.java @@ -37,10 +37,10 @@ protected MixinSkeletonHorseEntity(EntityType ent super(entityType, world); } - @Inject(method = "getBaseMovementSpeedMultiplier", at = @At("HEAD"), cancellable = true) - private void modifyBaseMovementSpeedMultiplier(CallbackInfoReturnable cir) { + @Inject(method = "getBaseWaterMovementSpeedMultiplier", at = @At("HEAD"), cancellable = true) + private void modifyBaseWaterMovementSpeedMultiplier(CallbackInfoReturnable cir) { if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(super.getBaseMovementSpeedMultiplier()); + cir.setReturnValue(super.getBaseWaterMovementSpeedMultiplier()); } }