Probably shouldn't hoe farmland blocks

This commit is contained in:
Shadows_of_Fire 2018-03-23 19:19:39 -04:00
parent 5b3c3fa46f
commit 76263a56d9

View file

@ -87,16 +87,11 @@ public class EntityWorm extends Entity{
if(!isFarmland || state.getValue(BlockFarmland.MOISTURE) < 7){ if(!isFarmland || state.getValue(BlockFarmland.MOISTURE) < 7){
if(isMiddlePose || this.world.rand.nextFloat() >= 0.45F){ if(isMiddlePose || this.world.rand.nextFloat() >= 0.45F){
DefaultFarmerBehavior.useHoeAt(world, pos); if(!isFarmland) DefaultFarmerBehavior.useHoeAt(world, pos);
state = this.world.getBlockState(pos); state = this.world.getBlockState(pos);
isFarmland = state.getBlock() instanceof BlockFarmland; isFarmland = state.getBlock() instanceof BlockFarmland;
if(isFarmland) if(isFarmland) this.world.setBlockState(pos, state.withProperty(BlockFarmland.MOISTURE, 7), 2);
this.world.setBlockState(pos, state.withProperty(BlockFarmland.MOISTURE, 7), 2);
if(!isFarmland){
this.world.setBlockToAir(pos.up());
}
} }
} }