Package dev.latvian.mods.kubejs.block
Record Class MapColorHelper
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.MapColorHelper
- All Implemented Interfaces:
Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.world.level.material.MapColor>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<Integer, MapColorHelper> static final Map<String, MapColorHelper> static final MapColorHelper -
Constructor Summary
ConstructorsConstructorDescriptionMapColorHelper(int id, String name, net.minecraft.world.level.material.MapColor color, org.joml.Vector3f rgb) Creates an instance of aMapColorHelperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.material.MapColorapply(net.minecraft.world.level.block.state.BlockState blockState) net.minecraft.world.level.material.MapColorcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.static MapColorHelperfindClosest(int rgbi) final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.static MapColorHelperreverse(net.minecraft.world.level.material.MapColor c) org.joml.Vector3frgb()Returns the value of thergbrecord component.final StringtoString()Returns a string representation of this record class.static net.minecraft.world.level.material.MapColor
-
Field Details
-
NAME_MAP
-
ID_MAP
-
NONE
-
-
Constructor Details
-
MapColorHelper
public MapColorHelper(int id, String name, net.minecraft.world.level.material.MapColor color, org.joml.Vector3f rgb) Creates an instance of aMapColorHelperrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentcolor- the value for thecolorrecord componentrgb- the value for thergbrecord component
-
-
Method Details
-
wrap
-
reverse
-
findClosest
-
apply
public net.minecraft.world.level.material.MapColor apply(net.minecraft.world.level.block.state.BlockState blockState) -
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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
color
public net.minecraft.world.level.material.MapColor color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
rgb
public org.joml.Vector3f rgb()Returns the value of thergbrecord component.- Returns:
- the value of the
rgbrecord component
-