Skip to content

Commit 44924de

Browse files
committed
still have so much work to do :(
1 parent d391acc commit 44924de

19 files changed

+175
-113
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
44

55
# Mod Properties
6-
version=1.0.0-beta.2
6+
version=1.0.0-beta.3
77

88
maven_group=io.github.axolotlclient.oldanimations
99
archives_base_name=AxolotlClient-OldAnimations

src/main/java/io/github/axolotlclient/oldanimations/OldAnimations.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,24 @@ public class OldAnimations implements ClientModInitializer {
3434
update deps (if needed)
3535
3636
--- Sneaking ---
37+
i really want to switch over to the 1.7 code instead of using the 1.13 code :/
3738
need to verify if other players have a different sneaking position
3839
3940
--- Items ---
4041
blocks item positions (rotations) + fix trapdoors and pressure plates and other crap
4142
rod and bow and block positions and swing position.. can be separate options LOL
4243
4344
--- Textures/Models ---
45+
add better compatibility for old textures -> make them variants
4446
fix weird fuzzy texture sizes of swords and stuff
45-
fast grass always showns in gui/dropped?
46-
held pressure plates look a bit different?? idk why THEYRE BIGGER THATS WHY
47+
fast grass always shown in gui/dropped?
48+
held pressure plates look a bit different?? idk why. THEYRE BIGGER THATS WHY
4749
old fence fate model
4850
oh my god. the custom models/textures are a damn nightmare of a mess
4951
tripwire texture and model changes
5052
cauldrons model and texture
5153
tops of certain blocks have switch uvs
54+
perhaps add an option to hide 1.8 blocks by using textures native to 1.7
5255
5356
--- World ---
5457
old fast smooth lighting shadows

src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public class OldAnimationsConfig {
9090
public final BooleanOption oldSwingVisualParticles = new BooleanOption("oldSwingVisualParticles", true);
9191
public final BooleanOption slowUpSneak = new BooleanOption("slowUpSneak", true);
9292
public final BooleanOption stopLineTranslateSneak = new BooleanOption("stopLineTranslateSneak", true);
93-
public final BooleanOption fixCameraPitch = new BooleanOption("fixCameraPitch", true);
9493
public final BooleanOption oldPotionGlint = new BooleanOption("oldPotionGlint", true);
9594
public final BooleanOption replaceSkullModel = new BooleanOption("replaceSkullModel", false);
9695
public final BooleanOption xpOrbPosition = new BooleanOption("xpOrbPosition", false);
@@ -120,6 +119,8 @@ public class OldAnimationsConfig {
120119
public final BooleanOption doubleTapSneak = new BooleanOption("doubleTapSneak", false);
121120
public final BooleanOption rotationVecYawFix = new BooleanOption("rotationVecYawFix", true);
122121
public final BooleanOption framedItemLighting = new BooleanOption("framedItemLighting", true);
122+
public final BooleanOption oldMapArms = new BooleanOption("oldMapArms", true);
123+
public final BooleanOption oldGameModeCommand = new BooleanOption("oldGameModeCommand", false);
123124

124125
private final Supplier<Boolean>[] suppliers = new Supplier[] {
125126
enabled::get,
@@ -240,13 +241,14 @@ public void initConfig() {
240241
disableAlexModel,
241242
disableSkinLayers,
242243
flameOffset,
244+
oldMapArms,
243245
oldPickupArm,
244-
fixCameraPitch,
245246
rotationVecYawFix,
246247
xpOrbPosition,
247248
oldFogGrayScale,
248249
removeHitBoxEyeLines,
249-
hitboxOffset
250+
hitboxOffset,
251+
oldGameModeCommand
250252
);
251253

252254
/* reload the resources upon toggling certain options */

src/main/java/io/github/axolotlclient/oldanimations/mixin/CapeLayerMixin.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,18 @@ public class CapeLayerMixin {
6262
@ModifyExpressionValue(method = "render(Lnet/minecraft/client/entity/living/player/ClientPlayerEntity;FFFFFFF)V", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/entity/living/player/ClientPlayerEntity;prevY:D"))
6363
private double axolotlclient$includeSneakOffset$PrevY(double original, @Local(argsOnly = true) ClientPlayerEntity clientPlayerEntity) {
6464
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get()) {
65-
/* sneaking moves the eyeheight down by 0.08 units... we must also make sure this applies to other renderings */
66-
original += clientPlayerEntity.isSneaking() ? -0.08F : 0.0F;
65+
/* sneaking moves the eyeheight down by 0.08 units... we must also make sure this applies to cape physics! */
66+
/* 0.2 * 0.4 = 0.08. values taken straight from 1.7 */
67+
original = original + clientPlayerEntity.getEyeHeight() - 1.62F;
6768
}
6869
return original;
6970
}
7071

7172
@ModifyExpressionValue(method = "render(Lnet/minecraft/client/entity/living/player/ClientPlayerEntity;FFFFFFF)V", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/entity/living/player/ClientPlayerEntity;y:D"))
7273
private double axolotlclient$includeSneakOffset$Y(double original, @Local(argsOnly = true) ClientPlayerEntity clientPlayerEntity) {
7374
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get()) {
74-
/* sneaking moves the eyeheight down by 0.08 units... we must also make sure this applies to other renderings */
75-
original += clientPlayerEntity.isSneaking() ? -0.08F : 0.0F;
75+
/* sneaking moves the eyeheight down by 0.08 units... we must also make sure this applies to cape physics! */
76+
original = original + clientPlayerEntity.getEyeHeight() - 1.62F;
7677
}
7778
return original;
7879
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientPlayNetworkHandlerMixin.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,26 @@
2020

2121
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
2222
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
23+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
24+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
2325
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
2426
import net.minecraft.client.network.handler.ClientPlayNetworkHandler;
2527
import net.minecraft.client.options.GameOptions;
2628
import net.minecraft.network.packet.s2c.play.TitlesS2CPacket;
2729
import net.minecraft.world.Difficulty;
30+
import org.objectweb.asm.Opcodes;
2831
import org.spongepowered.asm.mixin.Mixin;
32+
import org.spongepowered.asm.mixin.Unique;
2933
import org.spongepowered.asm.mixin.injection.At;
3034
import org.spongepowered.asm.mixin.injection.Inject;
3135
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
3236

3337
@Mixin(ClientPlayNetworkHandler.class)
3438
public abstract class ClientPlayNetworkHandlerMixin {
3539

40+
@Unique
41+
private static final String[] axolotlclient$EVENT_MESSAGES = new String[]{"tile.bed.notValid", null, null, "gameMode.changed"};
42+
3643
@ModifyExpressionValue(method = "handleAddXpOrb", at = @At(value = "CONSTANT", args = "doubleValue=32"))
3744
private double axolotlclient$oldOrbRendering(double original) {
3845
return original / (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.xpOrbPosition.get() ?
@@ -54,9 +61,19 @@ public abstract class ClientPlayNetworkHandlerMixin {
5461
}
5562
}
5663

57-
@WrapWithCondition(method = "handleLogin", at = @At(value = "FIELD", target = "Lnet/minecraft/client/options/GameOptions;difficulty:Lnet/minecraft/world/Difficulty;"))
64+
@WrapWithCondition(method = "handleLogin", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/options/GameOptions;difficulty:Lnet/minecraft/world/Difficulty;"))
5865
private boolean axolotlclient$dontUsePacketDifficulty(GameOptions instance, Difficulty value) {
5966
/* we're going to set the options difficulty elsewhere, so let's remove this as it's not needed */
6067
return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldDifficultyButtonLogic.get();
6168
}
69+
70+
@WrapOperation(method = "handleGameEvent", at = @At(value = "FIELD", opcode = Opcodes.GETSTATIC, target = "Lnet/minecraft/network/packet/s2c/play/GameEventS2CPacket;EVENT_MESSAGES:[Ljava/lang/String;"))
71+
private String[] axolotlclient$oldEventMessages(Operation<String[]> original) {
72+
/* taken from 1.7 */
73+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGameModeCommand.get()) {
74+
/* the server still notifies us on game mode changes, so we can easily just adapt this 1.7 code */
75+
return axolotlclient$EVENT_MESSAGES;
76+
}
77+
return original.call();
78+
}
6279
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityPickupParticleMixin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
2222
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
23+
import io.github.axolotlclient.oldanimations.util.PlayerUtil;
2324
import net.minecraft.client.entity.particle.EntityPickupParticle;
2425
import net.minecraft.entity.Entity;
2526
import org.objectweb.asm.Opcodes;
@@ -37,7 +38,7 @@ public abstract class EntityPickupParticleMixin {
3738
private double axolotlclient$includeEyeHeight$PrevTickY(double original) {
3839
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldItemPickup.get()) {
3940
/* taken from 1.7 */
40-
original += collector.getEyeHeight();
41+
original += (OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeight() : collector.getEyeHeight());
4142
}
4243
return original;
4344
}
@@ -46,7 +47,7 @@ public abstract class EntityPickupParticleMixin {
4647
private double axolotlclient$includeEyeHeight$Y(double original) {
4748
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldItemPickup.get()) {
4849
/* taken from 1.7 */
49-
original += collector.getEyeHeight();
50+
original += (OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeight() : collector.getEyeHeight());
5051
}
5152
return original;
5253
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRenderDispatcherMixin.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,15 @@
2828
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
2929
import io.github.axolotlclient.oldanimations.util.PlayerUtil;
3030
import net.minecraft.client.entity.living.player.ClientPlayerEntity;
31-
import net.minecraft.client.options.GameOptions;
32-
import net.minecraft.client.render.TextRenderer;
3331
import net.minecraft.client.render.entity.EntityRenderDispatcher;
3432
import net.minecraft.client.render.entity.PlayerRenderer;
3533
import net.minecraft.entity.Entity;
3634
import net.minecraft.entity.living.LivingEntity;
37-
import net.minecraft.world.World;
38-
import org.objectweb.asm.Opcodes;
3935
import org.spongepowered.asm.mixin.Mixin;
4036
import org.spongepowered.asm.mixin.Shadow;
4137
import org.spongepowered.asm.mixin.injection.At;
4238
import org.spongepowered.asm.mixin.injection.Inject;
4339
import org.spongepowered.asm.mixin.injection.ModifyArgs;
44-
import org.spongepowered.asm.mixin.injection.Slice;
45-
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
4640
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
4741
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
4842

@@ -52,22 +46,6 @@ public abstract class EntityRenderDispatcherMixin {
5246
@Shadow
5347
private PlayerRenderer defaultPlayerRenderer;
5448

55-
@Shadow
56-
public float cameraPitch;
57-
58-
//TODO: This should be merged into AxolotlClient as they already do a translation to fix the nametags which interferes with this
59-
@Inject(
60-
method = "prepare",
61-
at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/render/entity/EntityRenderDispatcher;cameraYaw:F", ordinal = 0, shift = At.Shift.AFTER),
62-
slice = @Slice(from = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/options/GameOptions;perspective:I"))
63-
)
64-
private void axolotlclient$fixCameraRotation(World world, TextRenderer textRenderer, Entity camera, Entity targetEntity, GameOptions options, float tickDelta, CallbackInfo ci) {
65-
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fixCameraPitch.get()) {
66-
/* camera rotation bug. originated in 1.8 and is fixed in 1.9 */
67-
cameraPitch *= -1;
68-
}
69-
}
70-
7149
@Inject(method = "getRenderer(Lnet/minecraft/entity/Entity;)Lnet/minecraft/client/render/entity/EntityRenderer;", at = @At("HEAD"), cancellable = true)
7250
private void axolotlclient$defaultToSteve(Entity entity, CallbackInfoReturnable<PlayerRenderer> cir) {
7351
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableAlexModel.get() && entity instanceof ClientPlayerEntity) {
@@ -101,7 +79,7 @@ public abstract class EntityRenderDispatcherMixin {
10179
private void axolotlclient$oldHitBoxBehavior(Args args, @Local(argsOnly = true) Entity entity) {
10280
if (OldAnimationsConfig.isEnabled() && PlayerUtil.INSTANCE.isSelf(entity)) {
10381
/* sneaking compatibility! */
104-
double eyeHeightOffset = OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeightSneakOffset() - 1.62F : 0.0F;
82+
double eyeHeightOffset = OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeight() - 1.62F : 0.0F;
10583
/* man there were a lot of eyeheight bugs back in the day LOOOL */
10684
double hitBoxOffset = OldAnimationsConfig.instance.hitboxOffset.get() ? 1.62F : 0.0F;
10785
args.set(1, (double) args.get(1) + eyeHeightOffset + hitBoxOffset);

src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRendererMixin.java

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,23 @@
2323
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
2424
import com.llamalad7.mixinextras.sugar.Local;
2525
import com.mojang.blaze3d.platform.GlStateManager;
26-
import io.github.axolotlclient.modules.freelook.Perspective;
27-
import io.github.axolotlclient.oldanimations.OldAnimations;
2826
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
2927
import io.github.axolotlclient.oldanimations.util.PlayerUtil;
30-
import net.minecraft.client.Minecraft;
31-
import net.minecraft.client.render.entity.EntityRenderDispatcher;
3228
import net.minecraft.client.render.entity.EntityRenderer;
3329
import net.minecraft.entity.Entity;
3430
import org.objectweb.asm.Opcodes;
35-
import org.spongepowered.asm.mixin.Final;
3631
import org.spongepowered.asm.mixin.Mixin;
37-
import org.spongepowered.asm.mixin.Shadow;
3832
import org.spongepowered.asm.mixin.injection.At;
39-
import org.spongepowered.asm.mixin.injection.Inject;
40-
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
4133

4234
@Mixin(EntityRenderer.class)
4335
public abstract class EntityRendererMixin {
4436

45-
@Shadow
46-
@Final
47-
protected EntityRenderDispatcher dispatcher;
48-
4937
@ModifyExpressionValue(method = "renderOnFire", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/Entity;y:D"))
5038
private double axolotlclient$includeEyeHeight$Y(double original, @Local(argsOnly = true) Entity entity) {
5139
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.flameOffset.get() && PlayerUtil.INSTANCE.isSelf(entity)) {
52-
/* taken from 1.7 */
40+
/* adapted from 1.7 */
5341
/* we must make sure the flame is synced with the interpolated player model position */
54-
original += (OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeightSneakOffset() : entity.getEyeHeight());
42+
original += (OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeight() : entity.getEyeHeight());
5543
}
5644
return original;
5745
}
@@ -61,23 +49,14 @@ public abstract class EntityRendererMixin {
6149
boolean oldFlameHeight = OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.flameOffset.get() && PlayerUtil.INSTANCE.isSelf(entity);
6250
if (oldFlameHeight) {
6351
GlStateManager.pushMatrix();
64-
/* taken from 1.7 */
52+
/* adapted from 1.7 */
6553
/* we must make sure the flame is synced with the interpolated player model position */
66-
float eyeHeight = (OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeightSneakOffset() : entity.getEyeHeight());
54+
float eyeHeight = (OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeight() : entity.getEyeHeight());
6755
GlStateManager.translatef(0.0F, eyeHeight, 0.0F);
6856
}
6957
original.call(instance, entity, dx, dy, dz, tickDelta);
7058
if (oldFlameHeight) {
7159
GlStateManager.popMatrix();
7260
}
7361
}
74-
75-
@Inject(method = "renderNameTag(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;rotatef(FFFF)V", ordinal = 1))
76-
private void axolotlclient$reverseNameplateRotation(Entity entity, String string, double d, double e, double f, int i, CallbackInfo ci) {
77-
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fixCameraPitch.get() &&
78-
OldAnimations.AXOLOTLCLIENT && Minecraft.getInstance().options.perspective == Perspective.THIRD_PERSON_FRONT.ordinal()) {
79-
/* we need to disable the axolotlclient nameplate rotation in order to use our own! */
80-
GlStateManager.rotatef(dispatcher.cameraPitch * 2, 1.0F, 0.0F, 0.0F);
81-
}
82-
}
8362
}

src/main/java/io/github/axolotlclient/oldanimations/mixin/FishingBobberEntityRendererMixin.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import net.minecraft.client.render.entity.FishingBobberRenderer;
2727
import net.minecraft.entity.living.player.PlayerEntity;
2828
import org.spongepowered.asm.mixin.Mixin;
29-
import org.spongepowered.asm.mixin.Unique;
3029
import org.spongepowered.asm.mixin.injection.At;
3130
import org.spongepowered.asm.mixin.injection.ModifyArgs;
3231
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
@@ -36,7 +35,7 @@ public abstract class FishingBobberEntityRendererMixin {
3635

3736
@ModifyArgs(method = "render(Lnet/minecraft/entity/FishingBobberEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/Vec3d;<init>(DDD)V"))
3837
private void axolotlclient$modifyLinePosition(Args args) {
39-
if (areItemPositionsEnabled()) {
38+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.itemPositions.get()) {
4039
/* original values from 1.7 */
4140
args.set(0, (double) args.get(0) - 0.24D);
4241
args.set(2, (double) args.get(2) + 0.45D);
@@ -57,13 +56,8 @@ public abstract class FishingBobberEntityRendererMixin {
5756
@WrapOperation(method = "render(Lnet/minecraft/entity/FishingBobberEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/living/player/PlayerEntity;getEyeHeight()F"))
5857
private float axolotlclient$useLerpEyeHeight_Fish(PlayerEntity instance, Operation<Float> original) {
5958
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.smoothSneaking.get()) {
60-
return PlayerUtil.INSTANCE.getEyeHeightSneakOffset();
59+
return PlayerUtil.INSTANCE.getEyeHeight();
6160
}
6261
return original.call(instance);
6362
}
64-
65-
@Unique
66-
private static boolean areItemPositionsEnabled() {
67-
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.itemPositions.get();
68-
}
6963
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* This program is free software; you can redistribute it and/or
3+
* modify it under the terms of the GNU Lesser General Public
4+
* License as published by the Free Software Foundation; either
5+
* version 3 of the License, or (at your option) any later version.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10+
* Lesser General Public License for more details.
11+
*
12+
* You should have received a copy of the GNU Lesser General Public License
13+
* along with this program; if not, write to the Free Software Foundation,
14+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15+
*
16+
* For more information, see the LICENSE file.
17+
*/
18+
19+
package io.github.axolotlclient.oldanimations.mixin;
20+
21+
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
22+
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
23+
import net.minecraft.server.command.GameModeCommand;
24+
import org.spongepowered.asm.mixin.Mixin;
25+
import org.spongepowered.asm.mixin.injection.At;
26+
27+
@Mixin(GameModeCommand.class)
28+
public class GameModeCommandMixin {
29+
30+
@ModifyExpressionValue(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/Gamerules;getBoolean(Ljava/lang/String;)Z"))
31+
private boolean axolotlclient$dontShowMessage(boolean original) {
32+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGameModeCommand.get()) {
33+
/* since we show the game mode feedback else where, we should just cancel this */
34+
return false;
35+
}
36+
return original;
37+
}
38+
}

0 commit comments

Comments
 (0)