Record Class VanillaBlockCodecs.WeightedPlate
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaBlockCodecs.WeightedPlate
- Enclosing class:
VanillaBlockCodecs
public static record VanillaBlockCodecs.WeightedPlate(int maxWeight, net.minecraft.world.level.block.state.properties.BlockSetType blockSetType)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VanillaBlockCodecs.WeightedPlate> -
Constructor Summary
ConstructorsConstructorDescriptionWeightedPlate(int maxWeight, net.minecraft.world.level.block.state.properties.BlockSetType blockSetType) Creates an instance of aWeightedPlaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.properties.BlockSetTypeReturns the value of theblockSetTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxWeightrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
WeightedPlate
public WeightedPlate(int maxWeight, net.minecraft.world.level.block.state.properties.BlockSetType blockSetType) Creates an instance of aWeightedPlaterecord class.- Parameters:
maxWeight- the value for themaxWeightrecord componentblockSetType- the value for theblockSetTyperecord 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. -
maxWeight
public int maxWeight()Returns the value of themaxWeightrecord component.- Returns:
- the value of the
maxWeightrecord component
-
blockSetType
public net.minecraft.world.level.block.state.properties.BlockSetType blockSetType()Returns the value of theblockSetTyperecord component.- Returns:
- the value of the
blockSetTyperecord component
-