Package vazkii.botania.api.block
Interface HornHarvestable
- All Known Implementing Classes:
DefaultHornHarvestable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Blocks with this capability can express custom logic when being
harvested by Botania horns.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHornHarvest(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, HornHarvestable.EnumHornType hornType, @Nullable net.minecraft.world.entity.LivingEntity user) Returns true if this block can be uprooted.default voidharvestByHorn(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, HornHarvestable.EnumHornType hornType, @Nullable net.minecraft.world.entity.LivingEntity user) Called to harvest by a horn.default booleanhasSpecialHornHarvest(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, HornHarvestable.EnumHornType hornType, @Nullable net.minecraft.world.entity.LivingEntity user) Returns true if harvestByHorn() should be called.
-
Field Details
-
ID
static final net.minecraft.resources.ResourceLocation ID
-
-
Method Details
-
canHornHarvest
boolean canHornHarvest(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, HornHarvestable.EnumHornType hornType, @Nullable @Nullable net.minecraft.world.entity.LivingEntity user) Returns true if this block can be uprooted. Note that the stack param can be empty if it's a drum breaking it. -
hasSpecialHornHarvest
default boolean hasSpecialHornHarvest(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, HornHarvestable.EnumHornType hornType, @Nullable @Nullable net.minecraft.world.entity.LivingEntity user) Returns true if harvestByHorn() should be called. If false it just uses the normal block breaking method. Note that the stack param can be empty if it's a drum breaking it. -
harvestByHorn
default void harvestByHorn(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, HornHarvestable.EnumHornType hornType, @Nullable @Nullable net.minecraft.world.entity.LivingEntity user) Called to harvest by a horn. Note that the stack param can be empty if it's a drum breaking it.
-