mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-20 21:21:40 +01:00
Remove ender eye slowdown in <= 1.10
Closes https://github.com/ViaVersion/ViaFabricPlus/issues/584
This commit is contained in:
parent
beaa5bb990
commit
041dbf8a8d
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
|
||||||
|
* Copyright (C) 2021-2024 FlorianMichael/EnZaXD <florian.michael07@gmail.com> and RK_01/RaphiMC
|
||||||
|
* Copyright (C) 2023-2024 contributors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.item;
|
||||||
|
|
||||||
|
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
|
||||||
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
|
import de.florianmichael.viafabricplus.protocoltranslator.ProtocolTranslator;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.EnderEyeItem;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|
||||||
|
@Mixin(EnderEyeItem.class)
|
||||||
|
public abstract class MixinEnderEyeItem {
|
||||||
|
|
||||||
|
@WrapWithCondition(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;setCurrentHand(Lnet/minecraft/util/Hand;)V"))
|
||||||
|
private boolean removeItemSlowdown(PlayerEntity instance, Hand hand) {
|
||||||
|
return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_11);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -216,7 +216,8 @@
|
|||||||
"fixes.viaversion.MixinWorldPacketRewriter1_19",
|
"fixes.viaversion.MixinWorldPacketRewriter1_19",
|
||||||
"viabedrock.MixinJoinPackets",
|
"viabedrock.MixinJoinPackets",
|
||||||
"vialegacy.MixinExtensionProtocolMetadataStorage",
|
"vialegacy.MixinExtensionProtocolMetadataStorage",
|
||||||
"vialegacy.MixinViaLegacyConfig"
|
"vialegacy.MixinViaLegacyConfig",
|
||||||
|
"fixes.minecraft.item.MixinEnderEyeItem"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
Loading…
Reference in New Issue
Block a user