Hello, I would appreciate some help with making it to where my custom mob has a chance of spawning whenever you break leaves.
version is 1.19.2
public static class breakLeavesEvent {
@SubscribeEvent
public static void block_break(final BlockEvent.BreakEvent event) {
Block blockIn = event.getState().getBlock();
Item itemInHand = event.getPlayer().getMainHandItem().getItem();
if(blockIn instanceof LeavesBlock && (itemInHand instanceof ShearsItem)) {
}
}
}
This is the event i have setup.