Package com.wdiscute.starcatcher.fish
Record Class Treasure
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.fish.Treasure
public record Treasure(List<WeightedLootTable> lootTables, List<WeightedStack> stacks, List<net.minecraft.world.item.crafting.Ingredient> blacklist)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Treasurestatic final Treasurestatic final com.mojang.serialization.Codec<Treasure> static final Treasurestatic final Treasurestatic final Treasurestatic final Treasurestatic final Treasurestatic final Treasurestatic final Treasurestatic final Treasurestatic final Treasurestatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Treasure> static final Treasure -
Constructor Summary
ConstructorsConstructorDescriptionTreasure(List<WeightedLootTable> lootTables, List<WeightedStack> stacks, List<net.minecraft.world.item.crafting.Ingredient> blacklist) Creates an instance of aTreasurerecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.item.crafting.Ingredient> Returns the value of theblacklistrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static TreasurelootTable(List<net.minecraft.resources.ResourceLocation> lootTables, net.minecraft.world.item.Item... blacklist) Returns the value of thelootTablesrecord component.static TreasurespecificItem(net.minecraft.world.item.ItemStack itemStack) stacks()Returns the value of thestacksrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.item.ItemStackunpack(net.minecraft.server.level.ServerPlayer player, List<AbstractCatchModifier> modifiers)
-
Field Details
-
EMPTY
-
VANILLA_FISHING_LOOT_TABLE
-
EXAMPLE_TREASURE
-
AZURE_CRYSTAL_SKIN_SMITHING_TEMPLATE
-
KIMBE_SMITHING_TEMPLATE
-
COLORFUL_SMITHING_TEMPLATE
-
CLEAR_SMITHING_TEMPLATE
-
KING_SMITHING_TEMPLATE
-
ICEBORN_SKIN_SMITHING_TEMPLATE
-
SKY_SKIN_SMITHING_TEMPLATE
-
SHARK_SKIN_SMITHING_TEMPLATE
-
LUSH_SKIN_SMITHING_TEMPLATE
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Treasure> STREAM_CODEC
-
-
Constructor Details
-
Treasure
public Treasure(List<WeightedLootTable> lootTables, List<WeightedStack> stacks, List<net.minecraft.world.item.crafting.Ingredient> blacklist) Creates an instance of aTreasurerecord class.- Parameters:
lootTables- the value for thelootTablesrecord componentstacks- the value for thestacksrecord componentblacklist- the value for theblacklistrecord component
-
-
Method Details
-
lootTable
-
specificItem
-
unpack
public net.minecraft.world.item.ItemStack unpack(net.minecraft.server.level.ServerPlayer player, List<AbstractCatchModifier> modifiers) -
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). -
lootTables
Returns the value of thelootTablesrecord component.- Returns:
- the value of the
lootTablesrecord component
-
stacks
Returns the value of thestacksrecord component.- Returns:
- the value of the
stacksrecord component
-
blacklist
Returns the value of theblacklistrecord component.- Returns:
- the value of the
blacklistrecord component
-