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 net.minecraft.world.item.crafting.display.SlotDisplay
SlotDisplay.AnyFuel, SlotDisplay.Composite, SlotDisplay.Empty, SlotDisplay.ItemSlotDisplay, SlotDisplay.ItemStackContentsFactory, SlotDisplay.ItemStackSlotDisplay, SlotDisplay.SmithingTrimDemoSlotDisplay, SlotDisplay.TagSlotDisplay, SlotDisplay.Type<T extends SlotDisplay>, 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 net.minecraft.world.item.crafting.display.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 pContext, DisplayContentsFactory<T> pOutput) final StringtoString()Returns a string representation of this record class.type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.display.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
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). -
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
-