Exclude grass blocks from earth ponies' ability so they aren't always swamped in tall grass every time

This commit is contained in:
Sollace 2024-01-03 23:01:45 +01:00
parent 5196c9bf17
commit 2d87fd5099
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -78,6 +78,10 @@ public class EarthPonyGrowAbility implements Ability<Pos> {
return growable.grow(w, state, pos) ? 1 : 0;
}
if (w.getBlockState(pos).isOf(Blocks.GRASS_BLOCK)) {
return 0;
}
if (BoneMealItem.useOnFertilizable(stack, w, pos)) {
if (w.random.nextInt(350) == 0) {
if (w.getBlockState(pos.down()).isOf(Blocks.FARMLAND)) {