From 01f6fb54e94be4f91afe122581e7c38757916cf7 Mon Sep 17 00:00:00 2001 From: Zero Date: Sun, 5 Dec 2021 11:37:13 -0500 Subject: [PATCH] Format source --- .../trampledisablerfabric/TrampleDisabler.java | 10 +++++----- .../mixin/MixinFarmlandBlock.java | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/zero/trampledisablerfabric/TrampleDisabler.java b/src/main/java/zero/trampledisablerfabric/TrampleDisabler.java index 1e64d5c..7e5ddcb 100644 --- a/src/main/java/zero/trampledisablerfabric/TrampleDisabler.java +++ b/src/main/java/zero/trampledisablerfabric/TrampleDisabler.java @@ -5,10 +5,10 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class TrampleDisabler implements ModInitializer { - public static final Logger LOGGER = LogManager.getLogger("trample-disabler"); + public static final Logger LOGGER = LogManager.getLogger("trample-disabler"); - @Override - public void onInitialize() { - LOGGER.info("TrampleDisabler enabled!"); - } + @Override + public void onInitialize() { + LOGGER.info("TrampleDisabler enabled!"); + } } diff --git a/src/main/java/zero/trampledisablerfabric/mixin/MixinFarmlandBlock.java b/src/main/java/zero/trampledisablerfabric/mixin/MixinFarmlandBlock.java index 3dd254f..5f098f2 100644 --- a/src/main/java/zero/trampledisablerfabric/mixin/MixinFarmlandBlock.java +++ b/src/main/java/zero/trampledisablerfabric/mixin/MixinFarmlandBlock.java @@ -13,13 +13,15 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(FarmlandBlock.class) public class MixinFarmlandBlock extends Block { - public MixinFarmlandBlock(Settings settings) { - super(settings); - } + public MixinFarmlandBlock(Settings settings) { + super(settings); + } - @Inject(method = {"onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V"}, at = {@At("HEAD")}, cancellable = true) - private void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance, CallbackInfo info) { - super.onLandedUpon(world, state, pos, entity, fallDistance); // Don't cancel fall damage - info.cancel(); - } + @Inject(method = {"onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V"}, + at = {@At("HEAD")}, cancellable = true) + private void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, + float fallDistance, CallbackInfo info) { + super.onLandedUpon(world, state, pos, entity, fallDistance); // Don't cancel fall damage + info.cancel(); + } }