From 322dafd4177fb2bd6c6775fb23234c3ef419a2d7 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Tue, 4 May 2021 15:07:19 +0800 Subject: [PATCH] Formatting code --- .../TweakMyClient/mixin/MixinClientPlayerEntity.java | 3 ++- .../hendrixshen/TweakMyClient/mixin/MixinCobwebBlock.java | 8 +++----- .../hendrixshen/TweakMyClient/mixin/MixinDeathScreen.java | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinClientPlayerEntity.java b/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinClientPlayerEntity.java index 893d5150..4a7d7feb 100644 --- a/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinClientPlayerEntity.java +++ b/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinClientPlayerEntity.java @@ -9,7 +9,8 @@ @Mixin(ClientPlayerEntity.class) public class MixinClientPlayerEntity { - @Shadow private boolean usingItem; + @Shadow + private boolean usingItem; @Redirect( method = "tickMovement", diff --git a/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinCobwebBlock.java b/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinCobwebBlock.java index 82c3ade6..6ac2c905 100644 --- a/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinCobwebBlock.java +++ b/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinCobwebBlock.java @@ -18,14 +18,12 @@ public class MixinCobwebBlock { method = "onEntityCollision", at = @At( value = "INVOKE", - target = "Lnet/minecraft/entity/Entity;slowMovement(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Vec3d;)V" + target = "Lnet/minecraft/entity/Entity;slowMovement(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Vec3d;)V" ), cancellable = true ) - private void onWalkInCobWebBlock(BlockState state, World world, BlockPos pos, Entity entity, CallbackInfo ci) - { - if ((Configs.Disable.DISABLE_SLOWDOWN.getBooleanValue()) && entity instanceof PlayerEntity) - { + private void onWalkInCobWebBlock(BlockState state, World world, BlockPos pos, Entity entity, CallbackInfo ci) { + if ((Configs.Disable.DISABLE_SLOWDOWN.getBooleanValue()) && entity instanceof PlayerEntity) { ci.cancel(); } } diff --git a/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinDeathScreen.java b/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinDeathScreen.java index 1f69af18..a1396eee 100644 --- a/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinDeathScreen.java +++ b/src/main/java/top/hendrixshen/TweakMyClient/mixin/MixinDeathScreen.java @@ -1,6 +1,5 @@ package top.hendrixshen.TweakMyClient.mixin; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.DeathScreen; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -17,8 +16,8 @@ public class MixinDeathScreen { value = "TAIL" ) ) - private void onTick(CallbackInfo ci){ - if(Configs.Feature.FEATURE_AUTO_RESPAWN.getBooleanValue()) { + private void onTick(CallbackInfo ci) { + if (Configs.Feature.FEATURE_AUTO_RESPAWN.getBooleanValue()) { assert TweakMyClient.minecraftClient.player != null; TweakMyClient.minecraftClient.player.requestRespawn(); TweakMyClient.minecraftClient.openScreen(null);