Interface Tillage
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
What a hoe does to a block type: what the block turns into, whether it needs room above, and
what falls out of it.
Only tilled() has to be given, so that a lambda is enough:
farming.tillable(PEAT, () -> farmland, plugin);
- Since:
- 0.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondrops(RandomGenerator random) Works out what falls out of the block when it is tilled, such as the roots of rooted dirt.default booleanReturnstrueif the block can only be tilled with air right above it.tilled()Returns the state the tilled block turns into.
-
Method Details
-
tilled
BlockData tilled()Returns the state the tilled block turns into.- Returns:
- the state the tilled block turns into
- Since:
- 0.1.0
-
needsRoom
default boolean needsRoom()Returnstrueif the block can only be tilled with air right above it.- Returns:
trueif the block can only be tilled with air right above it- Since:
- 0.1.0
-
drops
Works out what falls out of the block when it is tilled, such as the roots of rooted dirt.- Parameters:
random- the source of randomness to roll the drops with- Returns:
- the stacks to drop from the clicked face, empty for nothing
- Since:
- 0.1.0
-