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.EMPTYname- 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 aPatternContainerGrouprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static @Nullable PatternContainerGroupfromMachine(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) final inthashCode()Returns a hash code value for this object.@Nullable AEItemKeyicon()Returns the value of theiconrecord component.net.minecraft.network.chat.Componentname()Returns the value of thenamerecord component.static PatternContainerGroupnothing()static PatternContainerGroupreadFromPacket(net.minecraft.network.RegistryFriendlyByteBuf buffer) List<net.minecraft.network.chat.Component> tooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.voidwriteToPacket(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 theiconrecord component.- Returns:
- the value of the
iconrecord component
-
name
public net.minecraft.network.chat.Component name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
tooltip
Returns the value of thetooltiprecord component.- Returns:
- the value of the
tooltiprecord component
-