Package com.wdiscute.starcatcher.fish
Record Class WeightedLootTable
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.fish.WeightedLootTable
public record WeightedLootTable(net.minecraft.resources.ResourceLocation resourceLocation, int weight)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<WeightedLootTable> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WeightedLootTable> -
Constructor Summary
ConstructorsConstructorDescriptionWeightedLootTable(net.minecraft.resources.ResourceLocation resourceLocation) WeightedLootTable(net.minecraft.resources.ResourceLocation resourceLocation, int weight) Creates an instance of aWeightedLootTablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationReturns the value of theresourceLocationrecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,WeightedLootTable> STREAM_CODEC
-
-
Constructor Details
-
WeightedLootTable
public WeightedLootTable(net.minecraft.resources.ResourceLocation resourceLocation) -
WeightedLootTable
public WeightedLootTable(net.minecraft.resources.ResourceLocation resourceLocation, int weight) Creates an instance of aWeightedLootTablerecord class.- Parameters:
resourceLocation- the value for theresourceLocationrecord componentweight- the value for theweightrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
resourceLocation
public net.minecraft.resources.ResourceLocation resourceLocation()Returns the value of theresourceLocationrecord component.- Returns:
- the value of the
resourceLocationrecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-