Package dev.latvian.mods.kubejs.block
Record Class BlockTintFunction.Fixed
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.BlockTintFunction.Fixed
- All Implemented Interfaces:
BlockTintFunction
- Enclosing interface:
BlockTintFunction
public static record BlockTintFunction.Fixed(KubeColor color)
extends Record
implements BlockTintFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.latvian.mods.kubejs.block.BlockTintFunction
BlockTintFunction.Fixed, BlockTintFunction.Mapped -
Field Summary
Fields inherited from interface dev.latvian.mods.kubejs.block.BlockTintFunction
BIRCH_FOLIAGE, DEFAULT_FOLIAGE_COLOR, EVERGREEN_FOLIAGE, FOLIAGE, GRASS, MANGROVE_FOLIAGE, REDSTONE, REDSTONE_COLORS, TYPE_INFO, WATER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.getColor(net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos, int index) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Fixed
Creates an instance of aFixedrecord class.- Parameters:
color- the value for thecolorrecord component
-
-
Method Details
-
getColor
public KubeColor getColor(net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos, int index) - Specified by:
getColorin interfaceBlockTintFunction
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-