Package net.minecraft.data.loot.packs
Record Class VanillaChargedCreeperExplosionLoot.Entry
java.lang.Object
java.lang.Record
net.minecraft.data.loot.packs.VanillaChargedCreeperExplosionLoot.Entry
- Enclosing class:
VanillaChargedCreeperExplosionLoot
static record VanillaChargedCreeperExplosionLoot.Entry(ResourceKey<LootTable> lootTable, EntityType<?> entityType, Item item)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EntityType<?> The field for theentityTyperecord component.private final ItemThe field for theitemrecord component.private final ResourceKey<LootTable> The field for thelootTablerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry(ResourceKey<LootTable> lootTable, EntityType<?> entityType, Item item) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionEntityType<?> Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.Returns the value of thelootTablerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
lootTable
The field for thelootTablerecord component. -
entityType
The field for theentityTyperecord component. -
item
The field for theitemrecord component.
-
-
Constructor Details
-
Entry
Entry(ResourceKey<LootTable> lootTable, EntityType<?> entityType, Item item) Creates an instance of aEntryrecord class.- Parameters:
lootTable- the value for thelootTablerecord componententityType- the value for theentityTyperecord componentitem- the value for theitemrecord component
-
-
Method Details
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
lootTable
Returns the value of thelootTablerecord component.- Returns:
- the value of the
lootTablerecord component
-
entityType
Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-