Bonemeal mixin fix
This commit is contained in:
parent
66c2506fa3
commit
47ba04c177
1 changed files with 14 additions and 11 deletions
|
@ -37,6 +37,7 @@ public class BoneMealItemMixin {
|
||||||
if (!world.isClient) {
|
if (!world.isClient) {
|
||||||
BlockPos offseted = blockPos.offset(context.getSide());
|
BlockPos offseted = blockPos.offset(context.getSide());
|
||||||
boolean endBiome = world.getBiome(offseted).getCategory() == Category.THEEND;
|
boolean endBiome = world.getBiome(offseted).getCategory() == Category.THEEND;
|
||||||
|
//boolean skip = false;
|
||||||
|
|
||||||
if (world.getBlockState(blockPos).isIn(EndTags.END_GROUND)) {
|
if (world.getBlockState(blockPos).isIn(EndTags.END_GROUND)) {
|
||||||
boolean consume = false;
|
boolean consume = false;
|
||||||
|
@ -48,30 +49,32 @@ public class BoneMealItemMixin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!world.getBlockState(offseted).equals(Blocks.WATER)) {
|
if (!world.getFluidState(offseted).isEmpty() && endBiome) {
|
||||||
info.cancel();
|
if (world.getBlockState(offseted).equals(Blocks.WATER)) {
|
||||||
}
|
consume = beGrowWaterGrass(world, blockPos);
|
||||||
else if (!world.getFluidState(offseted).isEmpty() && endBiome) {
|
}
|
||||||
consume = beGrowWaterGrass(world, blockPos);
|
/*else {
|
||||||
|
skip = true;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
consume = beGrowGrass(world, blockPos);
|
consume = beGrowGrass(world, blockPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (consume) {
|
if (consume) {
|
||||||
if (!context.getPlayer().isCreative())
|
if (!context.getPlayer().isCreative()) {
|
||||||
context.getStack().decrement(1);
|
context.getStack().decrement(1);
|
||||||
|
}
|
||||||
world.syncWorldEvent(2005, blockPos, 0);
|
world.syncWorldEvent(2005, blockPos, 0);
|
||||||
info.setReturnValue(ActionResult.SUCCESS);
|
info.setReturnValue(ActionResult.SUCCESS);
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!world.getBlockState(offseted).equals(Blocks.WATER)) {
|
|
||||||
info.cancel();
|
|
||||||
}
|
|
||||||
else if (!world.getFluidState(offseted).isEmpty() && endBiome) {
|
else if (!world.getFluidState(offseted).isEmpty() && endBiome) {
|
||||||
info.setReturnValue(ActionResult.FAIL);
|
if (world.getBlockState(offseted).equals(Blocks.WATER)) {
|
||||||
info.cancel();
|
info.setReturnValue(ActionResult.FAIL);
|
||||||
|
info.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue