Package com.jvn.toucanlib.neoforge.loot
Class ToucanLivingDrops
java.lang.Object
com.jvn.toucanlib.neoforge.loot.ToucanLivingDrops
Convenience helpers for NeoForge living-drop events.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddDrop(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Adds an item stack to a living drop event at the entity's position.static booleanaddDropIfNoMatchingItem(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Adds a drop when the event does not already contain the same item.static voiddrop(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack) Spawns an item stack from a living entity immediately.static booleanhasDropWithSameItem(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Returns true when the event already contains the same item.static booleanhasDropWithSameItemAndComponents(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Returns true when the event already contains the same item and components.
-
Method Details
-
addDrop
public static void addDrop(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Adds an item stack to a living drop event at the entity's position. -
addDropIfNoMatchingItem
public static boolean addDropIfNoMatchingItem(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Adds a drop when the event does not already contain the same item. -
hasDropWithSameItem
public static boolean hasDropWithSameItem(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Returns true when the event already contains the same item. -
hasDropWithSameItemAndComponents
public static boolean hasDropWithSameItemAndComponents(net.neoforged.neoforge.event.entity.living.LivingDropsEvent event, net.minecraft.world.item.ItemStack stack) Returns true when the event already contains the same item and components. -
drop
public static void drop(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack) Spawns an item stack from a living entity immediately.
-