Record Class BannerPatternLayers.Layer
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.BannerPatternLayers.Layer
- Enclosing class:
BannerPatternLayers
public static record BannerPatternLayers.Layer(Holder<BannerPattern> pattern, DyeColor color)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<BannerPatternLayers.Layer> private final DyeColor
The field for thecolor
record component.private final Holder
<BannerPattern> The field for thepattern
record component.static final StreamCodec
<RegistryFriendlyByteBuf, BannerPatternLayers.Layer> -
Constructor Summary
ConstructorDescriptionLayer
(Holder<BannerPattern> pattern, DyeColor color) Creates an instance of aLayer
record class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()
Returns the value of thecolor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.pattern()
Returns the value of thepattern
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
pattern
The field for thepattern
record component. -
color
The field for thecolor
record component. -
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
Layer
Creates an instance of aLayer
record class.- Parameters:
pattern
- the value for thepattern
record componentcolor
- the value for thecolor
record component
-
-
Method Details
-
description
-
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)
. -
pattern
Returns the value of thepattern
record component.- Returns:
- the value of the
pattern
record component
-
color
Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-