mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Probably shouldn't hoe farmland blocks
This commit is contained in:
parent
5b3c3fa46f
commit
76263a56d9
1 changed files with 3 additions and 8 deletions
|
@ -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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue