From 72403f47bac8b3ef53b056c9b4bf502739448b88 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Fri, 16 Oct 2020 23:49:49 +0300 Subject: [PATCH] Function rename --- .../mixin/common/BoneMealItemMixin.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java b/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java index f1dc975c..1a0a4a46 100644 --- a/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java +++ b/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java @@ -27,21 +27,21 @@ public class BoneMealItemMixin { private static final Mutable POS = new Mutable(); @Inject(method = "useOnBlock", at = @At("HEAD"), cancellable = true) - private void onUse(ItemUsageContext context, CallbackInfoReturnable info) { + private void beOnUse(ItemUsageContext context, CallbackInfoReturnable info) { World world = context.getWorld(); BlockPos blockPos = context.getBlockPos(); if (!world.isClient) { if (world.getBlockState(blockPos).isIn(BlockTagRegistry.END_GROUND)) { boolean consume = false; if (world.getBlockState(blockPos).getBlock() == Blocks.END_STONE) { - BlockState nylium = getNylium(world, blockPos); + BlockState nylium = beGetNylium(world, blockPos); if (nylium != null) { BlocksHelper.setWithoutUpdate(world, blockPos, nylium); consume = true; } } else { - consume = growGrass(world, blockPos); + consume = beGrowGrass(world, blockPos); } if (consume) { if (!context.getPlayer().isCreative()) @@ -54,7 +54,7 @@ public class BoneMealItemMixin { } } - private boolean growGrass(World world, BlockPos pos) { + private boolean beGrowGrass(World world, BlockPos pos) { int y1 = pos.getY() + 3; int y2 = pos.getY() - 3; boolean result = false; @@ -67,7 +67,7 @@ public class BoneMealItemMixin { POS.setY(y); BlockPos down = POS.down(); if (world.isAir(POS) && !world.isAir(down)) { - BlockState grass = getGrassState(world, down); + BlockState grass = beGetGrassState(world, down); if (grass != null) { BlocksHelper.setWithoutUpdate(world, POS, grass); result = true; @@ -79,7 +79,7 @@ public class BoneMealItemMixin { return result; } - private BlockState getGrassState(World world, BlockPos pos) { + private BlockState beGetGrassState(World world, BlockPos pos) { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); if (block == BlockRegistry.END_MOSS || block == BlockRegistry.END_MYCELIUM) { @@ -91,7 +91,7 @@ public class BoneMealItemMixin { return null; } - private void shuffle(Random random) { + private void beShuffle(Random random) { for (int i = 0; i < 4; i++) { int j = random.nextInt(4); Direction d = DIR[i]; @@ -100,8 +100,8 @@ public class BoneMealItemMixin { } } - private BlockState getNylium(World world, BlockPos pos) { - shuffle(world.random); + private BlockState beGetNylium(World world, BlockPos pos) { + beShuffle(world.random); for (Direction dir : DIR) { BlockState state = world.getBlockState(pos.offset(dir)); if (BlocksHelper.isEndNylium(state))