Record Class WeightedLootTable
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.fish.WeightedLootTable
public record WeightedLootTable(net.minecraft.resources.Identifier 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.Identifier resourceLocation) WeightedLootTable(net.minecraft.resources.Identifier 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.IdentifierReturns 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.Identifier resourceLocation) -
WeightedLootTable
public WeightedLootTable(net.minecraft.resources.Identifier resourceLocation, int weight) Creates an instance of aWeightedLootTablerecord class.- Parameters:
resourceLocation- the value for theresourceLocationrecord componentweight- the value for theweightrecord component
-
-
Method Details
-
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. -
resourceLocation
public net.minecraft.resources.Identifier 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
-