java.lang.Object
tech.anonymoushacker1279.immersiveweapons.world.level.loot.number_providers.EntityKillersValue
All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser, net.minecraft.world.level.storage.loot.providers.number.NumberProvider

public class EntityKillersValue extends Object implements net.minecraft.world.level.storage.loot.providers.number.NumberProvider
Rolls are based on the number of entities that attacked the entity dropping loot.

Entities using this loot table must implement AttackerTracker, otherwise this will do nothing.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<EntityKillersValue>
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    equals(Object pOther)
     
    float
    getFloat(net.minecraft.world.level.storage.loot.LootContext lootContext)
     
    net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser

    getReferencedContextParams, validate

    Methods inherited from interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider

    getInt
  • Field Details

  • Method Details

    • getType

      public net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType getType()
      Specified by:
      getType in interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider
    • getFloat

      public float getFloat(net.minecraft.world.level.storage.loot.LootContext lootContext)
      Specified by:
      getFloat in interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider
    • create

      public static EntityKillersValue create()
    • equals

      public boolean equals(Object pOther)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object