diff --git a/src/main/java/dk/palmoe/immersivexp/Events.java b/src/main/java/dk/palmoe/immersivexp/Events.java index 295c6bb..8eb2356 100644 --- a/src/main/java/dk/palmoe/immersivexp/Events.java +++ b/src/main/java/dk/palmoe/immersivexp/Events.java @@ -7,6 +7,7 @@ import net.minecraft.block.CropBlock; import net.minecraft.block.MelonBlock; import net.minecraft.block.SweetBerryBushBlock; import net.minecraft.server.world.ServerWorld; +import net.minecraft.state.property.Property; import net.minecraft.tag.BlockTags; import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; @@ -37,7 +38,11 @@ public class Events { BlockState state = world.getBlockState(hitResult.getBlockPos()); if (state.getBlock() instanceof SweetBerryBushBlock && world instanceof ServerWorld) { - Util.spawnExp((ServerWorld) world, hitResult.getBlockPos(), 1, 1); + int age = state.get(SweetBerryBushBlock.AGE); + if (age == 3) { + Util.spawnExp((ServerWorld) world, hitResult.getBlockPos(), 1, 1); + } + } return ActionResult.PASS;