mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Made worms fertilize more often
This commit is contained in:
parent
1fd25ec885
commit
43229f2d20
1 changed files with 6 additions and 2 deletions
|
@ -75,17 +75,21 @@ public class EntityWorm extends Entity{
|
|||
}
|
||||
}
|
||||
|
||||
if(isFarmland && this.worldObj.rand.nextFloat() >= 0.95F){
|
||||
if(isFarmland && this.worldObj.rand.nextFloat() >= 0.8F){
|
||||
BlockPos plant = pos.up();
|
||||
if(!this.worldObj.isAirBlock(plant)){
|
||||
IBlockState plantState = this.worldObj.getBlockState(plant);
|
||||
Block plantBlock = plantState.getBlock();
|
||||
|
||||
plantBlock.updateTick(this.worldObj, plant, plantState, Util.RANDOM);
|
||||
|
||||
IBlockState newState = this.worldObj.getBlockState(plant);
|
||||
if(newState.getBlock().getMetaFromState(newState) != plantBlock.getMetaFromState(plantState)){
|
||||
this.worldObj.playEvent(2005, plant, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(isMiddlePose){
|
||||
this.setDead();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue