diff --git a/api/src/main/java/com/viaversion/viafabricplus/ViaFabricPlus.java b/api/src/main/java/com/viaversion/viafabricplus/ViaFabricPlus.java index 29a62772..5d705212 100644 --- a/api/src/main/java/com/viaversion/viafabricplus/ViaFabricPlus.java +++ b/api/src/main/java/com/viaversion/viafabricplus/ViaFabricPlus.java @@ -27,7 +27,7 @@ import org.jetbrains.annotations.ApiStatus; /** * Holder class for the {@link ViaFabricPlusBase} implementation */ -public class ViaFabricPlus { +public final class ViaFabricPlus { private static ViaFabricPlusBase impl; @@ -35,7 +35,7 @@ public class ViaFabricPlus { * Invoked by the internals to set the ViaFabricPlusBase implementation, DO NOT CALL THIS METHOD */ @ApiStatus.Internal - public static void init(ViaFabricPlusBase impl) { + public static void init(final ViaFabricPlusBase impl) { if (ViaFabricPlus.impl != null) { throw new IllegalStateException("ViaFabricPlus has already been initialized!"); } diff --git a/src/main/java/com/viaversion/viafabricplus/features/FeaturesLoading.java b/src/main/java/com/viaversion/viafabricplus/features/FeaturesLoading.java index 8aae124d..5e4b0ea1 100644 --- a/src/main/java/com/viaversion/viafabricplus/features/FeaturesLoading.java +++ b/src/main/java/com/viaversion/viafabricplus/features/FeaturesLoading.java @@ -23,7 +23,6 @@ package com.viaversion.viafabricplus.features; import com.viaversion.viafabricplus.api.events.LoadingCycleCallback; import com.viaversion.viafabricplus.base.Events; -import com.viaversion.viafabricplus.base.sync_tasks.DataCustomPayload; import com.viaversion.viafabricplus.features.emulation.armor_hud.ArmorHudEmulation1_8; import com.viaversion.viafabricplus.features.block.shape.CollisionShapes; import com.viaversion.viafabricplus.features.classic.cpe_extension.CPEAdditions; @@ -39,25 +38,39 @@ import net.raphimc.viaaprilfools.api.AprilFoolsProtocolVersion; public final class FeaturesLoading { static { + // Check if the pack format mappings are correct ResourcePackHeaderDiff.init(); + + // Register additional CPE features CPEAdditions.init(); - DataCustomPayload.init(); + + // Register the footstep particle FootStepParticle1_12_2.init(); Events.LOADING_CYCLE.register(cycle -> { if (cycle == LoadingCycleCallback.LoadingCycle.POST_GAME_LOAD) { - EntityDimensionDiff.init(); + // Handle clientside enchantment calculations in <= 1.20.6 EnchantmentAttributesEmulation1_20_6.init(); + + // Handles and updates entity dimension changes in <= 1.17 + EntityDimensionDiff.init(); + + // Ticks the armor hud manually in <= 1.8.x ArmorHudEmulation1_8.init(); } }); + // Reloads some clientside stuff when the protocol version changes Events.CHANGE_PROTOCOL_VERSION.register((oldVersion, newVersion) -> MinecraftClient.getInstance().execute(() -> { + // Reloads all bounding boxes of the blocks that we changed CollisionShapes.reloadBlockShapes(); + // Reloads the clientside recipes if (newVersion.olderThanOrEqualTo(ProtocolVersion.v1_11_1)) { Recipes1_11_2.reset(); } + + // Reload sound system when switching between 3D Shareware and normal versions if (oldVersion.equals(AprilFoolsProtocolVersion.s3d_shareware) || newVersion.equals(AprilFoolsProtocolVersion.s3d_shareware)) { MinecraftClient.getInstance().getSoundManager().reloadSounds(); } diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/integration/vialegacy/MixinViaLegacyConfig.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/MixinViaLegacyConfig.java similarity index 95% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/integration/vialegacy/MixinViaLegacyConfig.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/MixinViaLegacyConfig.java index f3ac9499..cc785545 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/integration/vialegacy/MixinViaLegacyConfig.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/MixinViaLegacyConfig.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.integration.vialegacy; +package com.viaversion.viafabricplus.injection.mixin.base.integration; import com.viaversion.viafabricplus.settings.impl.GeneralSettings; import net.raphimc.vialegacy.ViaLegacyConfig; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/integration/viabedrock/MixinJoinPackets.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/bedrock/MixinJoinPackets.java similarity index 97% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/integration/viabedrock/MixinJoinPackets.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/bedrock/MixinJoinPackets.java index 8eb79295..c241a09e 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/integration/viabedrock/MixinJoinPackets.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/bedrock/MixinJoinPackets.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.integration.viabedrock; +package com.viaversion.viafabricplus.injection.mixin.base.integration.bedrock; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.type.Type; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinEntity.java similarity index 75% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinEntity.java index 5b34b1b5..a1ed9b9c 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinEntity.java @@ -19,13 +19,12 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.entity; +package com.viaversion.viafabricplus.injection.mixin.features.movement.collision; -import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import net.minecraft.block.BlockState; import net.minecraft.block.FenceGateBlock; -import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.entity.Entity; import net.minecraft.registry.tag.BlockTags; import net.minecraft.util.math.BlockPos; @@ -41,15 +40,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.util.List; -@SuppressWarnings("ConstantValue") @Mixin(Entity.class) public abstract class MixinEntity { - @Shadow - private World world; - @Shadow private Vec3d pos; + @Shadow + private World world; @Shadow public abstract Box getBoundingBox(); @@ -74,15 +71,6 @@ public abstract class MixinEntity { } } - @Redirect(method = "setPitch", at = @At(value = "INVOKE", target = "Ljava/lang/Math;clamp(FFF)F", remap = false)) - private float dontClampPitch(float value, float min, float max) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) { - return value; - } else { - return Math.clamp(value, min, max); - } - } - @Inject(method = "adjustMovementForCollisions(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;", at = @At("HEAD"), cancellable = true) private void use1_20_6StepCollisionCalculation(Vec3d movement, CallbackInfoReturnable cir) { if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_5)) { @@ -133,17 +121,6 @@ public abstract class MixinEntity { } } - @ModifyConstant(method = "checkBlockCollision", constant = @Constant(doubleValue = 9.999999747378752E-6)) - private double fixBlockCollisionMargin(double constant) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_19_1)) { - return 1E-3; - } else if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) { - return 1E-7; - } else { - return constant; - } - } - @Inject(method = "getVelocityAffectingPos", at = @At("HEAD"), cancellable = true) private void modifyVelocityAffectingPos(CallbackInfoReturnable cir) { final ProtocolVersion target = ProtocolTranslator.getTargetVersion(); @@ -153,20 +130,6 @@ public abstract class MixinEntity { } } - @Redirect(method = {"setYaw", "setPitch"}, at = @At(value = "INVOKE", target = "Ljava/lang/Float;isFinite(F)Z")) - private boolean allowInfiniteValues(float f) { - return Float.isFinite(f) || ((Object) this instanceof ClientPlayerEntity && ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_16_4)); - } - - @ModifyConstant(method = "movementInputToVelocity", constant = @Constant(doubleValue = 1E-7)) - private static double fixVelocityEpsilon(double epsilon) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2)) { - return 1E-4; - } else { - return epsilon; - } - } - @Redirect(method = "adjustMovementForCollisions(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Box;Ljava/util/List;)Lnet/minecraft/util/math/Vec3d;", at = @At(value = "INVOKE", target = "Ljava/lang/Math;abs(D)D", ordinal = 0)) private static double alwaysSortYXZ(double a) { if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2)) { @@ -176,18 +139,4 @@ public abstract class MixinEntity { } } - @Inject(method = "getRotationVector(FF)Lnet/minecraft/util/math/Vec3d;", at = @At("HEAD"), cancellable = true) - private void revertCalculation(float pitch, float yaw, CallbackInfoReturnable cir) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(Vec3d.fromPolar(pitch, yaw)); - } - } - - @Inject(method = "getTargetingMargin", at = @At("HEAD"), cancellable = true) - private void expandHitBox(CallbackInfoReturnable cir) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) { - cir.setReturnValue(0.1F); - } - } - -} +} \ No newline at end of file diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/change_honey_slowness/MixinHoneyBlock.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinHoneyBlock.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/change_honey_slowness/MixinHoneyBlock.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinHoneyBlock.java index 61b45a4b..64014a04 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/change_honey_slowness/MixinHoneyBlock.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinHoneyBlock.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.change_honey_slowness; +package com.viaversion.viafabricplus.injection.mixin.features.movement.collision; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/handle_slowness_on_collision/MixinSoulSandBlock.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinSoulSandBlock.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/handle_slowness_on_collision/MixinSoulSandBlock.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinSoulSandBlock.java index 90995a29..3625abce 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/handle_slowness_on_collision/MixinSoulSandBlock.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinSoulSandBlock.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.handle_slowness_on_collision; +package com.viaversion.viafabricplus.injection.mixin.features.movement.collision; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinEntity.java new file mode 100644 index 00000000..40588614 --- /dev/null +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinEntity.java @@ -0,0 +1,64 @@ +/* + * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus + * Copyright (C) 2021-2024 the original authors + * - FlorianMichael/EnZaXD + * - RK_01/RaphiMC + * Copyright (C) 2023-2024 ViaVersion and 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 . + */ + +package com.viaversion.viafabricplus.injection.mixin.features.movement.constants; + +import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import net.minecraft.entity.Entity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Constant; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.ModifyConstant; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(Entity.class) +public abstract class MixinEntity { + + @ModifyConstant(method = "checkBlockCollision", constant = @Constant(doubleValue = 9.999999747378752E-6)) + private double fixBlockCollisionMargin(double constant) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_19_1)) { + return 1E-3; + } else if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) { + return 1E-7; + } else { + return constant; + } + } + + @ModifyConstant(method = "movementInputToVelocity", constant = @Constant(doubleValue = 1E-7)) + private static double fixVelocityEpsilon(double epsilon) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2)) { + return 1E-4; + } else { + return epsilon; + } + } + + @Inject(method = "getTargetingMargin", at = @At("HEAD"), cancellable = true) + private void expandHitBox(CallbackInfoReturnable cir) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) { + cir.setReturnValue(0.1F); + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinPlayerEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinPlayerEntity.java new file mode 100644 index 00000000..82915840 --- /dev/null +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinPlayerEntity.java @@ -0,0 +1,43 @@ +/* + * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus + * Copyright (C) 2021-2024 the original authors + * - FlorianMichael/EnZaXD + * - RK_01/RaphiMC + * Copyright (C) 2023-2024 ViaVersion and 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 . + */ + +package com.viaversion.viafabricplus.injection.mixin.features.movement.constants; + +import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import net.minecraft.entity.player.PlayerEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.Constant; +import org.spongepowered.asm.mixin.injection.ModifyConstant; + +@Mixin(PlayerEntity.class) +public abstract class MixinPlayerEntity { + + @ModifyConstant(method = "isSpaceAroundPlayerEmpty", constant = @Constant(doubleValue = 9.999999747378752E-6 /* 1.0E-5F */)) + private double removeOffsetWhenCheckingSneakingCollision(double constant) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_3)) { + return 0; + } else { + return constant; + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinPlayerEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinPlayerEntity.java index 977bf52a..9a32e982 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinPlayerEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/entity/MixinPlayerEntity.java @@ -91,15 +91,6 @@ public abstract class MixinPlayerEntity extends LivingEntity { } } - @ModifyConstant(method = "isSpaceAroundPlayerEmpty", constant = @Constant(doubleValue = 9.999999747378752E-6 /* 1.0E-5F */)) - private double removeOffsetWhenCheckingSneakingCollision(double constant) { - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_3)) { - return 0; - } else { - return constant; - } - } - @Redirect(method = "getMaxRelativeHeadRotation", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isBlocking()Z")) private boolean dontModifyHeadRotationWhenBlocking(PlayerEntity instance) { return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_20_2) && instance.isBlocking(); diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/limitation/rotation/MixinEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/limitation/rotation/MixinEntity.java new file mode 100644 index 00000000..0d5f47ff --- /dev/null +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/limitation/rotation/MixinEntity.java @@ -0,0 +1,59 @@ +/* + * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus + * Copyright (C) 2021-2024 the original authors + * - FlorianMichael/EnZaXD + * - RK_01/RaphiMC + * Copyright (C) 2023-2024 ViaVersion and 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 . + */ + +package com.viaversion.viafabricplus.injection.mixin.features.movement.limitation.rotation; + +import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.entity.Entity; +import net.minecraft.util.math.Vec3d; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.Redirect; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(Entity.class) +public abstract class MixinEntity { + + @Redirect(method = "setPitch", at = @At(value = "INVOKE", target = "Ljava/lang/Math;clamp(FFF)F", remap = false)) + private float dontClampPitch(float value, float min, float max) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) { + return value; + } else { + return Math.clamp(value, min, max); + } + } + + @Redirect(method = {"setYaw", "setPitch"}, at = @At(value = "INVOKE", target = "Ljava/lang/Float;isFinite(F)Z")) + private boolean allowInfiniteValues(float f) { + return Float.isFinite(f) || ((Object) this instanceof ClientPlayerEntity && ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_16_4)); + } + + @Inject(method = "getRotationVector(FF)Lnet/minecraft/util/math/Vec3d;", at = @At("HEAD"), cancellable = true) + private void revertCalculation(float pitch, float yaw, CallbackInfoReturnable cir) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_12_2)) { + cir.setReturnValue(Vec3d.fromPolar(pitch, yaw)); + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/replace_boat_movement/MixinClientPlayerEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/replace_boat_movement/MixinClientPlayerEntity.java deleted file mode 100644 index ae6f5935..00000000 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/replace_boat_movement/MixinClientPlayerEntity.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus - * Copyright (C) 2021-2024 the original authors - * - FlorianMichael/EnZaXD - * - RK_01/RaphiMC - * Copyright (C) 2023-2024 ViaVersion and 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 . - */ - -package com.viaversion.viafabricplus.injection.mixin.features.movement.replace_boat_movement; - -import com.mojang.authlib.GameProfile; -import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; -import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; -import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.entity.Entity; -import net.minecraft.entity.vehicle.BoatEntity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(value = ClientPlayerEntity.class, priority = 2000) -public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity { - - public MixinClientPlayerEntity(ClientWorld world, GameProfile profile) { - super(world, profile); - } - - @Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasVehicle()Z", ordinal = 0)) - private boolean removeVehicleRequirement(ClientPlayerEntity instance) { - return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_20) && instance.hasVehicle(); - } - - @Redirect(method = "canStartSprinting", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasVehicle()Z")) - private boolean removeVehicleCheck(ClientPlayerEntity instance) { - return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_19_3) && instance.hasVehicle(); - } - - @Inject(method = "startRiding", at = @At("RETURN")) - private void setRotationsWhenInBoat(Entity entity, boolean force, CallbackInfoReturnable cir) { - if (cir.getReturnValueZ() && entity instanceof BoatEntity && ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_18)) { - this.prevYaw = entity.getYaw(); - this.setYaw(entity.getYaw()); - this.setHeadYaw(entity.getYaw()); - } - } - -} \ No newline at end of file diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/r1_5_2_vehicle_movement/MixinClientPlayerEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/vehicle/MixinClientPlayerEntity.java similarity index 71% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/r1_5_2_vehicle_movement/MixinClientPlayerEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/vehicle/MixinClientPlayerEntity.java index da4dbbd0..b9366a4f 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/r1_5_2_vehicle_movement/MixinClientPlayerEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/vehicle/MixinClientPlayerEntity.java @@ -19,17 +19,20 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.r1_5_2_vehicle_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.vehicle; import com.mojang.authlib.GameProfile; import com.viaversion.viafabricplus.injection.access.base.IClientConnection; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.type.Types; import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.Entity; +import net.minecraft.entity.vehicle.BoatEntity; import net.minecraft.network.packet.Packet; import net.raphimc.vialegacy.api.LegacyProtocolVersion; import net.raphimc.vialegacy.protocol.release.r1_5_2tor1_6_1.Protocolr1_5_2Tor1_6_1; @@ -38,10 +41,12 @@ import org.spongepowered.asm.mixin.Final; 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.Redirect; import org.spongepowered.asm.mixin.injection.Slice; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -@Mixin(ClientPlayerEntity.class) +@Mixin(value = ClientPlayerEntity.class, priority = 2000) public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity { @Shadow @@ -52,6 +57,25 @@ public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity super(world, profile); } + @Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasVehicle()Z", ordinal = 0)) + private boolean removeVehicleRequirement(ClientPlayerEntity instance) { + return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_20) && instance.hasVehicle(); + } + + @Redirect(method = "canStartSprinting", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasVehicle()Z")) + private boolean removeVehicleCheck(ClientPlayerEntity instance) { + return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_19_3) && instance.hasVehicle(); + } + + @Inject(method = "startRiding", at = @At("RETURN")) + private void setRotationsWhenInBoat(Entity entity, boolean force, CallbackInfoReturnable cir) { + if (cir.getReturnValueZ() && entity instanceof BoatEntity && ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_18)) { + this.prevYaw = entity.getYaw(); + this.setYaw(entity.getYaw()); + this.setHeadYaw(entity.getYaw()); + } + } + @Redirect(method = "tick", slice = @Slice(from = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasVehicle()Z")), at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 0)) private void modifyPositionPacket(ClientPlayNetworkHandler instance, Packet packet) { if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(LegacyProtocolVersion.r1_5_2)) { diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinClientPlayerEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinClientPlayerEntity.java similarity index 99% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinClientPlayerEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinClientPlayerEntity.java index e2c687fd..909e764a 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinClientPlayerEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinClientPlayerEntity.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.water_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.water; import com.mojang.authlib.GameProfile; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinEntity.java similarity index 99% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinEntity.java index f351a48d..e9202c69 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinEntity.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.water_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.water; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinFlowableFluid.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinFlowableFluid.java similarity index 99% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinFlowableFluid.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinFlowableFluid.java index ae2833eb..63307932 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinFlowableFluid.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinFlowableFluid.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.water_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.water; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinItemEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinItemEntity.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinItemEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinItemEntity.java index 80e34cb1..a7b4a963 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinItemEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinItemEntity.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.water_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.water; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinLivingEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinLivingEntity.java similarity index 99% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinLivingEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinLivingEntity.java index 28064ec7..4cdfd13b 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinLivingEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinLivingEntity.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.water_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.water; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinSkeletonHorseEntity.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinSkeletonHorseEntity.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinSkeletonHorseEntity.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinSkeletonHorseEntity.java index 24533d28..bcfb5190 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water_movement/MixinSkeletonHorseEntity.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinSkeletonHorseEntity.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.movement.water_movement; +package com.viaversion.viafabricplus.injection.mixin.features.movement.water; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/packet_handling/MixinClientLoginNetworkHandler.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/MixinClientLoginNetworkHandler.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/packet_handling/MixinClientLoginNetworkHandler.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/MixinClientLoginNetworkHandler.java index ca95783e..4776313e 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/packet_handling/MixinClientLoginNetworkHandler.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/MixinClientLoginNetworkHandler.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.networking.packet_handling; +package com.viaversion.viafabricplus.injection.mixin.features.networking.limitation; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_nbt_limitation/MixinNamedCompoundTagType.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinNamedCompoundTagType.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_nbt_limitation/MixinNamedCompoundTagType.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinNamedCompoundTagType.java index 090fa0d5..b0e1d571 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_nbt_limitation/MixinNamedCompoundTagType.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinNamedCompoundTagType.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.networking.remove_nbt_limitation; +package com.viaversion.viafabricplus.injection.mixin.features.networking.limitation.nbt; import com.viaversion.nbt.limiter.TagLimiter; import com.viaversion.viaversion.api.type.types.misc.NamedCompoundTagType; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_nbt_limitation/MixinTagType.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinTagType.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_nbt_limitation/MixinTagType.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinTagType.java index 9e09ba1c..2d93351a 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_nbt_limitation/MixinTagType.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinTagType.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.networking.remove_nbt_limitation; +package com.viaversion.viafabricplus.injection.mixin.features.networking.limitation.nbt; import com.viaversion.nbt.limiter.TagLimiter; import com.viaversion.viaversion.api.type.types.misc.TagType; diff --git a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/run_command_action_handling/MixinScreen.java b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/run_command_action/MixinScreen.java similarity index 98% rename from src/main/java/com/viaversion/viafabricplus/injection/mixin/features/run_command_action_handling/MixinScreen.java rename to src/main/java/com/viaversion/viafabricplus/injection/mixin/features/run_command_action/MixinScreen.java index 0eb55ab0..a03a767f 100644 --- a/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/run_command_action_handling/MixinScreen.java +++ b/src/main/java/com/viaversion/viafabricplus/injection/mixin/features/run_command_action/MixinScreen.java @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -package com.viaversion.viafabricplus.injection.mixin.features.run_command_action_handling; +package com.viaversion.viafabricplus.injection.mixin.features.run_command_action; import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index 9f169402..364c3124 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -21,8 +21,10 @@ "base.integration.MixinMultiplayerServerListPinger_1", "base.integration.MixinServerInfo", "base.integration.MixinUserConnectionImpl", + "base.integration.MixinViaLegacyConfig", "base.integration.bedrock.MixinConfirmScreen", "base.integration.bedrock.MixinConnectScreen_1", + "base.integration.bedrock.MixinJoinPackets", "base.integration.bedrock.MixinMultiplayerServerListPinger", "base.integration.event.MixinMinecraftClient", "base.integration.sync_tasks.MixinClientCommonNetworkHandler", @@ -84,6 +86,9 @@ "features.classic.world_height.MixinEntityPacketRewriter1_17", "features.classic.world_height.MixinWorldPacketRewriter1_16_2", "features.classic.world_height.MixinWorldPacketRewriter1_17", + "features.emulation.recipe.MixinCraftingScreenHandler", + "features.emulation.recipe.MixinEntityPacketRewriter1_12", + "features.emulation.recipe.MixinPlayerScreenHandler", "features.entity.allow_duplicated_uuid.MixinEntityIndex", "features.entity.attribute.MixinEntityPacketRewriter1_20_5", "features.entity.attribute.MixinLivingEntity", @@ -173,30 +178,29 @@ "features.mouse_sensitivity.MixinMouse", "features.mouse_sensitivity.MixinMouseOptionsScreen", "features.movement.MixinClientPlayerEntity", - "features.movement.change_honey_slowness.MixinHoneyBlock", "features.movement.collision.MixinAbstractBoatEntity", + "features.movement.collision.MixinEntity", + "features.movement.collision.MixinHoneyBlock", + "features.movement.collision.MixinSoulSandBlock", "features.movement.elytra.MixinClientPlayerEntity", "features.movement.elytra.MixinFireworkRocketItem", "features.movement.elytra.MixinLivingEntity", "features.movement.elytra.MixinPlayerEntity", - "features.movement.entity.MixinEntity", "features.movement.entity.MixinLivingEntity", "features.movement.entity.MixinPlayerEntity", "features.movement.entity.MixinPlayerEntityRenderer", - "features.movement.handle_slowness_on_collision.MixinSoulSandBlock", "features.movement.jump.MixinClientPlayerEntity", - "features.movement.r1_5_2_vehicle_movement.MixinClientPlayerEntity", "features.movement.remove_bed_bounce.MixinBedBlock", - "features.movement.replace_boat_movement.MixinClientPlayerEntity", "features.movement.slowdown_calculation.MixinClientPlayerEntity", "features.movement.slowdown_calculation.MixinEnderEyeItem", "features.movement.sprinting_sneaking_condition.MixinClientPlayerEntity", - "features.movement.water_movement.MixinClientPlayerEntity", - "features.movement.water_movement.MixinEntity", - "features.movement.water_movement.MixinFlowableFluid", - "features.movement.water_movement.MixinItemEntity", - "features.movement.water_movement.MixinLivingEntity", - "features.movement.water_movement.MixinSkeletonHorseEntity", + "features.movement.vehicle.MixinClientPlayerEntity", + "features.movement.water.MixinClientPlayerEntity", + "features.movement.water.MixinEntity", + "features.movement.water.MixinFlowableFluid", + "features.movement.water.MixinItemEntity", + "features.movement.water.MixinLivingEntity", + "features.movement.water.MixinSkeletonHorseEntity", "features.networking.config_state.MixinClientConfigurationNetworkHandler", "features.networking.config_state.MixinClientPlayNetworkHandler", "features.networking.config_state.MixinNetworkStateTransitionHandler", @@ -210,9 +214,11 @@ "features.networking.legacy_chat_signature.MixinPlayerPublicKey_PublicKeyData", "features.networking.legacy_chat_signature.MixinProfileKeysImpl", "features.networking.legacy_chat_signature.MixinYggdrasilUserApiService", + "features.networking.limitation.MixinClientLoginNetworkHandler", + "features.networking.limitation.nbt.MixinNamedCompoundTagType", + "features.networking.limitation.nbt.MixinTagType", "features.networking.open_inventory_packet.MixinMinecraftClient", "features.networking.packet_handling.MixinClientCommonNetworkHandler", - "features.networking.packet_handling.MixinClientLoginNetworkHandler", "features.networking.packet_handling.MixinClientPlayNetworkHandler", "features.networking.packet_handling.MixinEntityPacketRewriter1_19_4", "features.networking.packet_handling.MixinEntityPacketRewriter1_20_3", @@ -220,8 +226,6 @@ "features.networking.registry_validation.MixinRegistryEntryList_Named", "features.networking.registry_validation.MixinRegistryEntryListCodec", "features.networking.remove_legacy_pinger.MixinMultiplayerServerListPinger", - "features.networking.remove_nbt_limitation.MixinNamedCompoundTagType", - "features.networking.remove_nbt_limitation.MixinTagType", "features.networking.remove_signed_commands.MixinClientPlayNetworkHandler", "features.networking.remove_signed_commands.MixinProtocol1_20_3To1_20_5", "features.networking.resource_pack_header.MixinServerResourcePackLoader_4", @@ -229,14 +233,11 @@ "features.networking.srv_resolving.MixinConnectScreen_1", "features.networking.srv_resolving.MixinRedirectResolver", "features.networking.srv_resolving.MixinServerAddress", - "features.emulation.recipe.MixinCraftingScreenHandler", - "features.emulation.recipe.MixinEntityPacketRewriter1_12", - "features.emulation.recipe.MixinPlayerScreenHandler", "features.remove_newer_screen_features.MixinCommandBlockScreen", "features.remove_newer_screen_features.MixinJigsawBlockScreen", "features.remove_newer_screen_features.MixinStructureBlockScreen_1", "features.replace_blank_glyph.MixinFontStorage", - "features.run_command_action_handling.MixinScreen", + "features.run_command_action.MixinScreen", "features.sign_editor_reach.MixinAbstractSignEditScreen", "features.skin_loading.MixinPlayerListEntry", "features.swinging.MixinInventoryTracker1_16", @@ -246,14 +247,17 @@ "features.world.disable_sequencing.MixinClientWorld", "features.world.item_picking.MixinClientPlayerInteractionManager", "features.world.item_picking.MixinMinecraftClient", - "features.world.remove_server_view_distance.MixinGameOptions", - "integration.viabedrock.MixinJoinPackets", - "integration.vialegacy.MixinViaLegacyConfig" + "features.world.remove_server_view_distance.MixinGameOptions" ], "injectors": { "defaultRequire": 1 }, "overwrites": { "requireAnnotations": true - } + }, + "mixins": [ + "features.movement.constants.MixinEntity", + "features.movement.constants.MixinPlayerEntity", + "features.movement.limitation.rotation.MixinEntity" + ] }