Record Class SlotDisplay.DyedSlotDemo
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.display.SlotDisplay.DyedSlotDemo
- All Implemented Interfaces:
SlotDisplay
- Enclosing interface:
SlotDisplay
public static record SlotDisplay.DyedSlotDemo(SlotDisplay dye, SlotDisplay target)
extends Record
implements SlotDisplay
-
Nested Class Summary
Nested classes/interfaces inherited from interface SlotDisplay
SlotDisplay.AnyFuel, SlotDisplay.Composite, SlotDisplay.DyedSlotDemo, SlotDisplay.Empty, SlotDisplay.ItemSlotDisplay, SlotDisplay.ItemStackContentsFactory, SlotDisplay.ItemStackSlotDisplay, SlotDisplay.OnlyWithComponent, SlotDisplay.SmithingTrimDemoSlotDisplay, SlotDisplay.TagSlotDisplay, SlotDisplay.Type<T>, SlotDisplay.WithAnyPotion, SlotDisplay.WithRemainder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SlotDisplayThe field for thedyerecord component.static final com.mojang.serialization.MapCodec<SlotDisplay.DyedSlotDemo> static final StreamCodec<RegistryFriendlyByteBuf, SlotDisplay.DyedSlotDemo> private final SlotDisplayThe field for thetargetrecord component.static final SlotDisplay.Type<SlotDisplay.DyedSlotDemo> Fields inherited from interface SlotDisplay
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionDyedSlotDemo(SlotDisplay dye, SlotDisplay target) Creates an instance of aDyedSlotDemorecord class. -
Method Summary
Modifier and TypeMethodDescriptiondye()Returns the value of thedyerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<T> Stream<T> resolve(ContextMap context, DisplayContentsFactory<T> factory) target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface SlotDisplay
isEnabled, resolveForFirstStack, resolveForStacks
-
Field Details
-
dye
The field for thedyerecord component. -
target
The field for thetargetrecord component. -
MAP_CODEC
-
STREAM_CODEC
-
TYPE
-
-
Constructor Details
-
DyedSlotDemo
Creates an instance of aDyedSlotDemorecord class.- Parameters:
dye- the value for thedyerecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceSlotDisplay
-
resolve
- Specified by:
resolvein interfaceSlotDisplay
-
toString
-
hashCode
-
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). -
dye
Returns the value of thedyerecord component.- Returns:
- the value of the
dyerecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-