Record Class ExtendedMaterialRules.RandomMaterialCondition
java.lang.Object
java.lang.Record
net.rodofire.easierworldcreator.world.gen.surfacebuilder.ExtendedMaterialRules.RandomMaterialCondition
- All Implemented Interfaces:
Function<net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialRuleContext,,net.minecraft.world.gen.surfacebuilder.MaterialRules.BooleanSupplier> net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialCondition
- Enclosing class:
ExtendedMaterialRules
public static record ExtendedMaterialRules.RandomMaterialCondition(net.minecraft.util.Identifier name, float bound)
extends Record
implements net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialCondition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.util.dynamic.CodecHolder<ExtendedMaterialRules.RandomMaterialCondition> -
Constructor Summary
ConstructorsConstructorDescriptionRandomMaterialCondition(net.minecraft.util.Identifier name, float bound) Creates an instance of aRandomMaterialConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.gen.surfacebuilder.MaterialRules.BooleanSupplierapply(net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialRuleContext materialRuleContext) floatbound()Returns the value of theboundrecord component.net.minecraft.util.dynamic.CodecHolder<? extends net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialCondition> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.util.Identifiername()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
public static final net.minecraft.util.dynamic.CodecHolder<ExtendedMaterialRules.RandomMaterialCondition> CODEC
-
-
Constructor Details
-
RandomMaterialCondition
public RandomMaterialCondition(net.minecraft.util.Identifier name, float bound) Creates an instance of aRandomMaterialConditionrecord class.- Parameters:
name- the value for thenamerecord componentbound- the value for theboundrecord component
-
-
Method Details
-
codec
public net.minecraft.util.dynamic.CodecHolder<? extends net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialCondition> codec()- Specified by:
codecin interfacenet.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialCondition
-
apply
public net.minecraft.world.gen.surfacebuilder.MaterialRules.BooleanSupplier apply(net.minecraft.world.gen.surfacebuilder.MaterialRules.MaterialRuleContext materialRuleContext) -
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 '=='. -
name
public net.minecraft.util.Identifier name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
bound
public float bound()Returns the value of theboundrecord component.- Returns:
- the value of the
boundrecord component
-