public interface IForgeShearable
Modifier and Type | Method and Description |
---|---|
default boolean |
isShearable(ItemStack item,
World world,
BlockPos pos)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
default java.util.List<ItemStack> |
onSheared(PlayerEntity player,
ItemStack item,
World world,
BlockPos pos,
int fortune)
Performs the shear function on this object.
|
default boolean isShearable(@Nonnull ItemStack item, World world, BlockPos pos)
item
- The ItemStack that is being used, may be empty.world
- The current world.pos
- Block's position in world.@Nonnull default java.util.List<ItemStack> onSheared(@Nullable PlayerEntity player, @Nonnull ItemStack item, World world, BlockPos pos, int fortune)
item
- The ItemStack that is being used, may be empty.world
- The current world.pos
- If this is a block, the block's position in world.fortune
- The fortune level of the shears being used.