Record Class PatternContainerGroup
java.lang.Object
java.lang.Record
appeng.api.implementations.blockentities.PatternContainerGroup
- Record Components:
icon
- The icon to display when referring to the grouped containers. This stack will NEVER be modified. It will be used to show an icon, as well as compared to group similar containers. It may beItemStack.EMPTY
name
- The name to use to refer to the group.tooltip
- Additional tooltip lines to describe the group (i.e. installed upgrades).
public record PatternContainerGroup(@Nullable AEItemKey icon, net.minecraft.network.chat.Component name, List<net.minecraft.network.chat.Component> tooltip)
extends Record
Provides both a key for grouping pattern providers, and displaying the group in the pattern access terminal.
The group can be the crafting container itself, for example if it is given a custom name by the player. It might
default to the crafting machine it is adjacent otherwise.
-
Constructor Summary
ConstructorsConstructorDescriptionPatternContainerGroup
(@Nullable AEItemKey icon, net.minecraft.network.chat.Component name, List<net.minecraft.network.chat.Component> tooltip) Creates an instance of aPatternContainerGroup
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static @Nullable PatternContainerGroup
fromMachine
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) final int
hashCode()
Returns a hash code value for this object.@Nullable AEItemKey
icon()
Returns the value of theicon
record component.net.minecraft.network.chat.Component
name()
Returns the value of thename
record component.static PatternContainerGroup
nothing()
static PatternContainerGroup
readFromPacket
(net.minecraft.network.RegistryFriendlyByteBuf buffer) List
<net.minecraft.network.chat.Component> tooltip()
Returns the value of thetooltip
record component.final String
toString()
Returns a string representation of this record class.void
writeToPacket
(net.minecraft.network.RegistryFriendlyByteBuf buffer)
-
Constructor Details
-
Method Details
-
nothing
-
writeToPacket
public void writeToPacket(net.minecraft.network.RegistryFriendlyByteBuf buffer) -
readFromPacket
public static PatternContainerGroup readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf buffer) -
fromMachine
@Nullable public static @Nullable PatternContainerGroup fromMachine(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) -
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)
. -
icon
Returns the value of theicon
record component.- Returns:
- the value of the
icon
record component
-
name
public net.minecraft.network.chat.Component name()Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
tooltip
Returns the value of thetooltip
record component.- Returns:
- the value of the
tooltip
record component
-