Record Class PoolTarget
java.lang.Object
java.lang.Record
net.darkhax.bookshelf.common.api.data.loot.PoolTarget
- Record Components:
table- The id of the loot table to target.index- The index of the pool within the loot table. This is usually based on the order pools appear in the JSON data.hash- A hash of the pools JSON data. This can be obtained using the bookshelf debug command in a development environment.
public record PoolTarget(net.minecraft.resources.Identifier table, int index, int hash)
extends Record
Represents a specific loot pool target within a loot table. This class also provides predefined constants for some of
the commonly modified loot pools.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTargetstatic final PoolTarget -
Constructor Summary
ConstructorsConstructorDescriptionPoolTarget(net.minecraft.resources.Identifier table, int index, int hash) Creates an instance of aPoolTargetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.inthash()Returns the value of thehashrecord component.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.static PoolTargetof(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table, int index, int hash) net.minecraft.resources.Identifiertable()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MINESHAFT_RARE
-
MINESHAFT_UNCOMMON
-
MINESHAFT_COMMON
-
SIMPLE_DUNGEON_RARE
-
SIMPLE_DUNGEON_UNCOMMON
-
SIMPLE_DUNGEON_COMMON
-
CAT_GIFT
-
FISHING
-
FISHING_FISH
-
FISHING_JUNK
-
FISHING_TREASURE
-
PIGLIN_BARTERING
-
SNIFFER_DIGGING
-
ARCHAEOLOGY_PYRAMID
-
ARCHAEOLOGY_DESERT_WELL
-
ARCHAEOLOGY_OCEAN_RUIN_COLD
-
ARCHAEOLOGY_OCEAN_RUIN_WARM
-
ARCHAEOLOGY_TRAIL_RUINS_COMMON
-
ARCHAEOLOGY_TRAIL_RUINS_RARE
-
-
Constructor Details
-
PoolTarget
-
-
Method Details
-
of
public static PoolTarget of(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table, int index, int hash) -
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
table
-
index
-
hash
-