Record Class SurfaceRules.StoneDepthCheck
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.SurfaceRules.StoneDepthCheck
- All Implemented Interfaces:
- Function<SurfaceRules.Context,,- SurfaceRules.Condition> - SurfaceRules.ConditionSource
- Enclosing class:
- SurfaceRules
static record SurfaceRules.StoneDepthCheck(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType)
extends Record
implements SurfaceRules.ConditionSource
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theaddSurfaceDepthrecord component.(package private) static final KeyDispatchDataCodec<SurfaceRules.StoneDepthCheck>private final intThe field for theoffsetrecord component.private final intThe field for thesecondaryDepthRangerecord component.private final CaveSurfaceThe field for thesurfaceTyperecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionStoneDepthCheck(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType) Creates an instance of aStoneDepthCheckrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns the value of theaddSurfaceDepthrecord component.apply(SurfaceRules.Context p_189755_) KeyDispatchDataCodec<? extends SurfaceRules.ConditionSource>codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intoffset()Returns the value of theoffsetrecord component.intReturns the value of thesecondaryDepthRangerecord component.Returns the value of thesurfaceTyperecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
offsetprivate final int offsetThe field for theoffsetrecord component.
- 
addSurfaceDepthprivate final boolean addSurfaceDepthThe field for theaddSurfaceDepthrecord component.
- 
secondaryDepthRangeprivate final int secondaryDepthRangeThe field for thesecondaryDepthRangerecord component.
- 
surfaceTypeThe field for thesurfaceTyperecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
StoneDepthCheckStoneDepthCheck(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType) Creates an instance of aStoneDepthCheckrecord class.- Parameters:
- offset- the value for the- offsetrecord component
- addSurfaceDepth- the value for the- addSurfaceDepthrecord component
- secondaryDepthRange- the value for the- secondaryDepthRangerecord component
- surfaceType- the value for the- surfaceTyperecord component
 
 
- 
- 
Method Details- 
codec- Specified by:
- codecin interface- SurfaceRules.ConditionSource
 
- 
apply- Specified by:
- applyin interface- Function<SurfaceRules.Context,- SurfaceRules.Condition> 
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
offsetpublic int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the offsetrecord component
 
- 
addSurfaceDepthpublic boolean addSurfaceDepth()Returns the value of theaddSurfaceDepthrecord component.- Returns:
- the value of the addSurfaceDepthrecord component
 
- 
secondaryDepthRangepublic int secondaryDepthRange()Returns the value of thesecondaryDepthRangerecord component.- Returns:
- the value of the secondaryDepthRangerecord component
 
- 
surfaceTypeReturns the value of thesurfaceTyperecord component.- Returns:
- the value of the surfaceTyperecord component
 
 
-