Class ExpandLivingDropsEvent

java.lang.Object
com.blamejared.crafttweaker.natives.event.entity.living.ExpandLivingDropsEvent

@ZenRegister public class ExpandLivingDropsEvent extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IEventBus<net.minecraftforge.event.entity.living.LivingDropsEvent>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addDrop(net.minecraftforge.event.entity.living.LivingDropsEvent internal, IItemStack stack)
    Adds an item to the drops.
    getDrops(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
    Returns the list of items will be dropped.
    static int
    getLootingLevel(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
     
    static net.minecraft.world.damagesource.DamageSource
    getSource(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
     
    static boolean
    isRecentlyHit(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
    Whether the Entity doing the drop has recently been damaged.
    static void
    removeDrop(net.minecraftforge.event.entity.living.LivingDropsEvent internal, IIngredient ingredient)
    Removes items that match the given ingredient from drops.
    static void
    setDrops(net.minecraftforge.event.entity.living.LivingDropsEvent internal, List<IItemStack> drops)
    Sets which items will be dropped.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BUS

      public static final IEventBus<net.minecraftforge.event.entity.living.LivingDropsEvent> BUS
  • Constructor Details

    • ExpandLivingDropsEvent

      public ExpandLivingDropsEvent()
  • Method Details

    • getSource

      public static net.minecraft.world.damagesource.DamageSource getSource(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
    • getDrops

      public static List<IItemStack> getDrops(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
      Returns the list of items will be dropped. The list is read-only, modifying this list does not change the drops.

      You should use the `drops` setter, `addDrop` or `removeDrop` method to change the drops.

    • setDrops

      public static void setDrops(net.minecraftforge.event.entity.living.LivingDropsEvent internal, List<IItemStack> drops)
      Sets which items will be dropped.
    • getLootingLevel

      public static int getLootingLevel(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
    • isRecentlyHit

      public static boolean isRecentlyHit(net.minecraftforge.event.entity.living.LivingDropsEvent internal)
      Whether the Entity doing the drop has recently been damaged.
    • addDrop

      public static void addDrop(net.minecraftforge.event.entity.living.LivingDropsEvent internal, IItemStack stack)
      Adds an item to the drops.
    • removeDrop

      public static void removeDrop(net.minecraftforge.event.entity.living.LivingDropsEvent internal, IIngredient ingredient)
      Removes items that match the given ingredient from drops.