Record Class FluidSlotDisplay
java.lang.Object
java.lang.Record
net.neoforged.neoforge.fluids.crafting.display.FluidSlotDisplay
- Record Components:
fluid- The fluid to be displayed.
- All Implemented Interfaces:
SlotDisplay
Slot display for a single fluid holder.
Note that information on amount and data of the displayed fluid stack depends on the provided factory!
-
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 TypeFieldDescriptionThe field for thefluidrecord component.static final com.mojang.serialization.MapCodec<FluidSlotDisplay> static final StreamCodec<RegistryFriendlyByteBuf, FluidSlotDisplay> Fields inherited from interface SlotDisplay
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFluidSlotDisplay(Holder<Fluid> fluid) Creates an instance of aFluidSlotDisplayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fluid()Returns the value of thefluidrecord component.final inthashCode()Returns a hash code value for this object.<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
-
fluid
-
MAP_CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
FluidSlotDisplay
-
-
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). -
fluid
-