Record Class SlotDisplay.SmithingTrimDemoSlotDisplay
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.display.SlotDisplay.SmithingTrimDemoSlotDisplay
- All Implemented Interfaces:
SlotDisplay
- Enclosing interface:
SlotDisplay
public static record SlotDisplay.SmithingTrimDemoSlotDisplay(SlotDisplay base, SlotDisplay material, Holder<TrimPattern> pattern)
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 thebaserecord component.static final com.mojang.serialization.MapCodec<SlotDisplay.SmithingTrimDemoSlotDisplay> private final SlotDisplayThe field for thematerialrecord component.private final Holder<TrimPattern> The field for thepatternrecord component.static final SlotDisplay.Type<SlotDisplay.SmithingTrimDemoSlotDisplay> Fields inherited from interface SlotDisplay
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSmithingTrimDemoSlotDisplay(SlotDisplay base, SlotDisplay material, Holder<TrimPattern> pattern) Creates an instance of aSmithingTrimDemoSlotDisplayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.material()Returns the value of thematerialrecord component.pattern()Returns the value of thepatternrecord component.<T> Stream<T> resolve(ContextMap context, DisplayContentsFactory<T> factory) final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface SlotDisplay
isEnabled, resolveForFirstStack, resolveForStacks
-
Field Details
-
base
The field for thebaserecord component. -
material
The field for thematerialrecord component. -
pattern
The field for thepatternrecord component. -
MAP_CODEC
public static final com.mojang.serialization.MapCodec<SlotDisplay.SmithingTrimDemoSlotDisplay> MAP_CODEC -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, SlotDisplay.SmithingTrimDemoSlotDisplay> STREAM_CODEC -
TYPE
-
-
Constructor Details
-
SmithingTrimDemoSlotDisplay
public SmithingTrimDemoSlotDisplay(SlotDisplay base, SlotDisplay material, Holder<TrimPattern> pattern) Creates an instance of aSmithingTrimDemoSlotDisplayrecord class.- Parameters:
base- the value for thebaserecord componentmaterial- the value for thematerialrecord componentpattern- the value for thepatternrecord 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). -
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-