Changes
From Forge Community Wiki
11 bytes added
, 01:10, 20 April 2021
mLine 149: |
Line 149: |
| The <code>Post</code> event is fired after growth. | | The <code>Post</code> event is fired after growth. |
| | | |
− | <code>getOriginalState</code> Get the state before growth happened. | + | <code>getOriginalState()</code> Get the state before growth happened. |
| | | |
| Example usage: | | Example usage: |
Line 209: |
Line 209: |
| Example usage: | | Example usage: |
| <syntaxhighlight lang="java"> | | <syntaxhighlight lang="java"> |
− | public void event(final BlockEvent.BlockToolInteractEvent event) | + | public void onToolInteract(final BlockEvent.BlockToolInteractEvent event) |
| { | | { |
| if (event.getFinalState().is(Blocks.FARMLAND) && event.getHeldItemStack().getItem() == Items.NETHERITE_HOE) | | if (event.getFinalState().is(Blocks.FARMLAND) && event.getHeldItemStack().getItem() == Items.NETHERITE_HOE) |