Class BlockHarvestUtils
java.lang.Object
com.hypixel.hytale.server.core.modules.interaction.BlockHarvestUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculateDurabilityUse(Item item, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) getDrops(com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int quantity, String itemId, String dropListId) static ItemToolSpecgetSpecPowerDamageBlock(Item item, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, ItemTool tool) static voidnaturallyRemoveBlock(Vector3i blockPosition, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int filler, int quantity, String itemId, String dropListId, int setBlockSettings, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) static voidnaturallyRemoveBlockByPhysics(Vector3i blockPosition, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int filler, int setBlockSettings, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) Deprecated.static voidperformBlockBreak(Ref<EntityStore> ref, ItemStack heldItemStack, Vector3i targetBlock, int setBlockSettings, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) static voidperformBlockBreak(Ref<EntityStore> ref, ItemStack heldItemStack, Vector3i targetBlock, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) static voidperformBlockBreak(World world, Vector3i blockPosition, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType targetBlockTypeKey, ItemStack heldItemStack, int dropQuantity, String dropItemId, String dropListId, int setBlockSettings, Ref<EntityStore> ref, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) static booleanperformBlockDamage(Vector3i targetBlock, ItemStack itemStack, ItemTool tool, float damageScale, int setBlockSettings, Ref<ChunkStore> chunkReference, CommandBuffer<EntityStore> commandBuffer, ComponentAccessor<ChunkStore> chunkStore) static booleanperformBlockDamage(LivingEntity entity, Ref<EntityStore> ref, Vector3i targetBlockPos, ItemStack itemStack, ItemTool tool, String toolId, boolean matchTool, float damageScale, int setBlockSettings, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) static voidperformPickupByInteraction(Ref<EntityStore> ref, Vector3i targetBlock, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int filler, Ref<ChunkStore> chunkReference, ComponentAccessor<EntityStore> entityStore, ComponentAccessor<ChunkStore> chunkStore) protected static voidremoveBlock(Vector3i blockPosition, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int setBlockSettings, Ref<ChunkStore> chunkReference, ComponentAccessor<ChunkStore> chunkStore) static booleanshouldPickupByInteraction(com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType)
-
Constructor Details
-
BlockHarvestUtils
public BlockHarvestUtils()
-
-
Method Details
-
getSpecPowerDamageBlock
@Nullable public static ItemToolSpec getSpecPowerDamageBlock(@Nullable Item item, @Nullable com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, @Nullable ItemTool tool) -
calculateDurabilityUse
public static double calculateDurabilityUse(@Nonnull Item item, @Nullable com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) -
performBlockDamage
public static boolean performBlockDamage(@Nonnull Vector3i targetBlock, @Nullable ItemStack itemStack, @Nullable ItemTool tool, float damageScale, int setBlockSettings, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
performBlockDamage
public static boolean performBlockDamage(@Nullable LivingEntity entity, @Nullable Ref<EntityStore> ref, @Nonnull Vector3i targetBlockPos, @Nullable ItemStack itemStack, @Nullable ItemTool tool, @Nullable String toolId, boolean matchTool, float damageScale, int setBlockSettings, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
performBlockBreak
public static void performBlockBreak(@Nullable Ref<EntityStore> ref, @Nullable ItemStack heldItemStack, @Nonnull Vector3i targetBlock, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
performBlockBreak
public static void performBlockBreak(@Nullable Ref<EntityStore> ref, @Nullable ItemStack heldItemStack, @Nonnull Vector3i targetBlock, int setBlockSettings, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
performBlockBreak
public static void performBlockBreak(@Nonnull World world, @Nonnull Vector3i blockPosition, @Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType targetBlockTypeKey, @Nullable ItemStack heldItemStack, int dropQuantity, @Nullable String dropItemId, @Nullable String dropListId, int setBlockSettings, @Nullable Ref<EntityStore> ref, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
naturallyRemoveBlockByPhysics
@Deprecated public static void naturallyRemoveBlockByPhysics(@Nonnull Vector3i blockPosition, @Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int filler, int setBlockSettings, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) Deprecated. -
naturallyRemoveBlock
public static void naturallyRemoveBlock(@Nonnull Vector3i blockPosition, @Nullable com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int filler, int quantity, String itemId, String dropListId, int setBlockSettings, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
shouldPickupByInteraction
public static boolean shouldPickupByInteraction(@Nullable com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) -
performPickupByInteraction
public static void performPickupByInteraction(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i targetBlock, @Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int filler, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
removeBlock
protected static void removeBlock(@Nonnull Vector3i blockPosition, @Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, int setBlockSettings, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
getDrops
-