Record Class RuinedPortalStructure.Setup
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.structures.RuinedPortalStructure.Setup
- Enclosing class:
- RuinedPortalStructure
public static record RuinedPortalStructure.Setup(RuinedPortalPiece.VerticalPlacement placement, float airPocketProbability, float mossiness, boolean overgrown, boolean vines, boolean canBeCold, boolean replaceWithBlackstone, float weight)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final float
The field for theairPocketProbability
record component.private final boolean
The field for thecanBeCold
record component.static final com.mojang.serialization.Codec<RuinedPortalStructure.Setup>
private final float
The field for themossiness
record component.private final boolean
The field for theovergrown
record component.private final RuinedPortalPiece.VerticalPlacement
The field for theplacement
record component.private final boolean
The field for thereplaceWithBlackstone
record component.private final boolean
The field for thevines
record component.private final float
The field for theweight
record component. -
Constructor Summary
ConstructorDescriptionSetup
(RuinedPortalPiece.VerticalPlacement placement, float airPocketProbability, float mossiness, boolean overgrown, boolean vines, boolean canBeCold, boolean replaceWithBlackstone, float weight) Creates an instance of aSetup
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of theairPocketProbability
record component.boolean
Returns the value of thecanBeCold
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float
Returns the value of themossiness
record component.boolean
Returns the value of theovergrown
record component.Returns the value of theplacement
record component.boolean
Returns the value of thereplaceWithBlackstone
record component.final String
toString()
Returns a string representation of this record class.boolean
vines()
Returns the value of thevines
record component.float
weight()
Returns the value of theweight
record component.
-
Field Details
-
placement
The field for theplacement
record component. -
airPocketProbability
private final float airPocketProbabilityThe field for theairPocketProbability
record component. -
mossiness
private final float mossinessThe field for themossiness
record component. -
overgrown
private final boolean overgrownThe field for theovergrown
record component. -
vines
private final boolean vinesThe field for thevines
record component. -
canBeCold
private final boolean canBeColdThe field for thecanBeCold
record component. -
replaceWithBlackstone
private final boolean replaceWithBlackstoneThe field for thereplaceWithBlackstone
record component. -
weight
private final float weightThe field for theweight
record component. -
CODEC
-
-
Constructor Details
-
Setup
public Setup(RuinedPortalPiece.VerticalPlacement placement, float airPocketProbability, float mossiness, boolean overgrown, boolean vines, boolean canBeCold, boolean replaceWithBlackstone, float weight) Creates an instance of aSetup
record class.- Parameters:
placement
- the value for theplacement
record componentairPocketProbability
- the value for theairPocketProbability
record componentmossiness
- the value for themossiness
record componentovergrown
- the value for theovergrown
record componentvines
- the value for thevines
record componentcanBeCold
- the value for thecanBeCold
record componentreplaceWithBlackstone
- the value for thereplaceWithBlackstone
record componentweight
- the value for theweight
record 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 '=='. -
placement
Returns the value of theplacement
record component.- Returns:
- the value of the
placement
record component
-
airPocketProbability
public float airPocketProbability()Returns the value of theairPocketProbability
record component.- Returns:
- the value of the
airPocketProbability
record component
-
mossiness
public float mossiness()Returns the value of themossiness
record component.- Returns:
- the value of the
mossiness
record component
-
overgrown
public boolean overgrown()Returns the value of theovergrown
record component.- Returns:
- the value of the
overgrown
record component
-
vines
public boolean vines()Returns the value of thevines
record component.- Returns:
- the value of the
vines
record component
-
canBeCold
public boolean canBeCold()Returns the value of thecanBeCold
record component.- Returns:
- the value of the
canBeCold
record component
-
replaceWithBlackstone
public boolean replaceWithBlackstone()Returns the value of thereplaceWithBlackstone
record component.- Returns:
- the value of the
replaceWithBlackstone
record component
-
weight
public float weight()Returns the value of theweight
record component.- Returns:
- the value of the
weight
record component
-