diff --git a/src/client/java/dev/isxander/debugify/client/DebugifyClient.java b/src/client/java/dev/isxander/debugify/client/DebugifyClient.java index 8a1b98c3..02d6a5b0 100644 --- a/src/client/java/dev/isxander/debugify/client/DebugifyClient.java +++ b/src/client/java/dev/isxander/debugify/client/DebugifyClient.java @@ -2,6 +2,7 @@ import dev.isxander.debugify.Debugify; import dev.isxander.debugify.client.utils.BugFixDescriptionCache; +import dev.isxander.debugify.client.utils.ClientUtils; public class DebugifyClient { public static BugFixDescriptionCache bugFixDescriptionCache; @@ -13,6 +14,6 @@ public static void onInitializeClient() { } public static boolean isGameplayFixesEnabled() { - return Debugify.CONFIG.gameplayFixesInMultiplayer; + return !ClientUtils.isInMultiplayerWorld() || Debugify.CONFIG.gameplayFixesInMultiplayer; } } diff --git a/src/client/java/dev/isxander/debugify/client/mixins/basic/mc231097/LocalPlayerMixin.java b/src/client/java/dev/isxander/debugify/client/mixins/gameplay/mc231097/LocalPlayerMixin.java similarity index 79% rename from src/client/java/dev/isxander/debugify/client/mixins/basic/mc231097/LocalPlayerMixin.java rename to src/client/java/dev/isxander/debugify/client/mixins/gameplay/mc231097/LocalPlayerMixin.java index eaff3e14..daf24d7f 100644 --- a/src/client/java/dev/isxander/debugify/client/mixins/basic/mc231097/LocalPlayerMixin.java +++ b/src/client/java/dev/isxander/debugify/client/mixins/gameplay/mc231097/LocalPlayerMixin.java @@ -1,5 +1,6 @@ -package dev.isxander.debugify.client.mixins.basic.mc231097; +package dev.isxander.debugify.client.mixins.gameplay.mc231097; +import dev.isxander.debugify.client.DebugifyClient; import dev.isxander.debugify.fixes.BugFix; import dev.isxander.debugify.fixes.FixCategory; import net.minecraft.client.Minecraft; @@ -11,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -@BugFix(id = "MC-231097", category = FixCategory.BASIC, env = BugFix.Env.CLIENT) +@BugFix(id = "MC-231097", category = FixCategory.GAMEPLAY, env = BugFix.Env.CLIENT) @Mixin(LocalPlayer.class) public abstract class LocalPlayerMixin { @Shadow @Final protected Minecraft minecraft; @@ -20,7 +21,7 @@ public abstract class LocalPlayerMixin { @Inject(method = "drop", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/player/Inventory;removeFromSelected(Z)Lnet/minecraft/world/item/ItemStack;", shift = At.Shift.AFTER)) private void onDropItem(boolean entireStack, CallbackInfoReturnable cir) { - if (isUsingItem()) { + if (isUsingItem() && DebugifyClient.isGameplayFixesEnabled()) { minecraft.gameMode.releaseUsingItem((LocalPlayer) (Object) this); } } diff --git a/src/client/resources/debugify.client.mixins.json b/src/client/resources/debugify.client.mixins.json index 3bd29cd2..4b4dc403 100644 --- a/src/client/resources/debugify.client.mixins.json +++ b/src/client/resources/debugify.client.mixins.json @@ -26,7 +26,7 @@ "basic.mc217716.GameRendererMixin", "basic.mc22882.AbstractContainerScreenMixin", "basic.mc22882.MinecraftMixin", - "basic.mc231097.LocalPlayerMixin", + "gameplay.mc231097.LocalPlayerMixin", "basic.mc237493.OptionsMixin", "basic.mc237493.TelemetryEventInstanceMixin", "basic.mc237493.TelemetryEventWidgetMixin", diff --git a/src/main/resources/assets/debugify/lang/en_us.json b/src/main/resources/assets/debugify/lang/en_us.json index f078a6f3..4a6af941 100644 --- a/src/main/resources/assets/debugify/lang/en_us.json +++ b/src/main/resources/assets/debugify/lang/en_us.json @@ -48,6 +48,8 @@ "debugify.fix_explanation.mc-176559": "Does not consider item durability when comparing a change in item when checking if block breaking should reset.", "debugify.fix_explanation.mc-197260": "Overrides the light level passed to the armour stand renderer with a maximum of: the block below the armor stand, bottom of the armor stand, top of the armor stand and the block above of the armor stand.", "debugify.fix_explanation.mc-237493": "Adds an option in the telemetry menu to completely disable telemetry. Telemetry is disabled by overriding all outgoing telemetry events to be an empty telemetry event, which is not sent.", + "debugify.fix_explanation.mc-231097": "When dropping an item, the client will send a \"release using item\" packet, if the player is currently using an item.", + "debugify.fix_effect.mc-231097": "This can cause very strict anti-cheats, such as Anti-Gaming-Chair, to flag \"invalid packet order\", which may result in a ban.", "debugify.fix_explanation.mc-2025": "Due to floating point inaccuracies, sometimes the hitbox of entities end up being slightly smaller than desired. Then, if this happens before the entities are pushed against eachother, they will intersect with the wall. Then, when the AABB is recalculated on chunk load, they will be determined as inside the wall, where they are then pushed. This fix simply writes an 'AABB' tag to entity NBT data with double-precision hitbox sizes which then get loaded back in.", "debugify.fix_effect.mc-2025": "This fix means loading Debugify for the first time will not fix the issue until the chunks are saved and loaded with Debugify.",