Record Class EntityKillersValue
java.lang.Object
java.lang.Record
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 record EntityKillersValue()
extends Record
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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<EntityKillersValue> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aEntityKillersValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityKillersValuecreate()booleanIndicates whether some other object is "equal to" this one.floatgetFloat(net.minecraft.world.level.storage.loot.LootContext lootContext) net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderTypegetType()inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams, validateMethods inherited from interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider
getInt
-
Field Details
-
CODEC
-
-
Constructor Details
-
EntityKillersValue
public EntityKillersValue()Creates an instance of aEntityKillersValuerecord class.
-
-
Method Details
-
getType
public net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType getType()- Specified by:
getTypein interfacenet.minecraft.world.level.storage.loot.providers.number.NumberProvider
-
getFloat
public float getFloat(net.minecraft.world.level.storage.loot.LootContext lootContext) - Specified by:
getFloatin interfacenet.minecraft.world.level.storage.loot.providers.number.NumberProvider
-
create
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
-