Package dev.latvian.mods.kubejs.client
Record Class BlockTintFunctionWrapper
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.client.BlockTintFunctionWrapper
- All Implemented Interfaces:
net.minecraft.client.color.block.BlockColor
public record BlockTintFunctionWrapper(BlockTintFunction function)
extends Record
implements net.minecraft.client.color.block.BlockColor
-
Constructor Summary
ConstructorsConstructorDescriptionBlockTintFunctionWrapper(BlockTintFunction function) Creates an instance of aBlockTintFunctionWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.intgetColor(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
-
BlockTintFunctionWrapper
Creates an instance of aBlockTintFunctionWrapperrecord class.- Parameters:
function- the value for thefunctionrecord component
-
-
Method Details
-
getColor
public int 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 interfacenet.minecraft.client.color.block.BlockColor
-
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). -
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-