Record Class PartConfigEntry
java.lang.Object
java.lang.Record
org.cyclops.integrateddynamics.core.part.PartConfigEntry
- Record Components:
id- The identifier of this entry, which is stable across reloads, as it is what a disabled entry is remembered by.group- What this entry belongs to, such as the aspect that a property belongs to.label- The name of this entry.value- What is stored for it, which is empty when the name says it all.icon- The item to show in the slot of this entry, which is empty when it has no slot.aspect- The unique name of the aspect that this entry stands for, which is shown as an item next to its name, and empty for an entry that is not an aspect itself.color- The colour that this entry is shown in, which is the display colour of the value type it belongs to, and empty for entries that belong to no value type.section- The configuration section that this entry belongs to.
public record PartConfigEntry(String id, net.minecraft.network.chat.Component group, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component value, net.minecraft.world.item.ItemStack icon, Optional<net.minecraft.resources.Identifier> aspect, OptionalInt color, PartConfigSection section)
extends Record
One thing inside a
PartConfigSnapshot that the player can switch off before pasting.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPartConfigEntry(String id, net.minecraft.network.chat.Component group, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component value, net.minecraft.world.item.ItemStack icon, Optional<net.minecraft.resources.Identifier> aspect, OptionalInt color, PartConfigSection section) Creates an instance of aPartConfigEntryrecord class.PartConfigEntry(String id, net.minecraft.network.chat.Component group, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component value, PartConfigSection section) An entry that is shown without an item next to it, and in no colour of its own. -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.resources.Identifier> aspect()Returns the value of theaspectrecord component.color()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.chat.Componentgroup()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackicon()Returns the value of theiconrecord component.id()Returns the value of theidrecord component.static StringidAspectProperty(net.minecraft.resources.Identifier aspect, String property) static StringidExtra(PartConfigSection section, String key) Part types must build the identifiers of their own entries with this, so that they can not collide with the entries of another part type or of another section.static StringidPartSetting(String setting) static StringidVariableCard(String inventoryName, int slot) net.minecraft.network.chat.Componentlabel()Returns the value of thelabelrecord component.section()Returns the value of thesectionrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.chat.Componentvalue()Returns the value of thevaluerecord component.
-
Field Details
-
PREFIX_PART_SETTINGS
- See Also:
-
PREFIX_ASPECT
- See Also:
-
PREFIX_VARIABLE_CARD
- See Also:
-
PREFIX_EXTRA
- See Also:
-
-
Constructor Details
-
PartConfigEntry
public PartConfigEntry(String id, net.minecraft.network.chat.Component group, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component value, PartConfigSection section) An entry that is shown without an item next to it, and in no colour of its own. -
PartConfigEntry
public PartConfigEntry(String id, net.minecraft.network.chat.Component group, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component value, net.minecraft.world.item.ItemStack icon, Optional<net.minecraft.resources.Identifier> aspect, OptionalInt color, PartConfigSection section) Creates an instance of aPartConfigEntryrecord class.- Parameters:
id- the value for theidrecord componentgroup- the value for thegrouprecord componentlabel- the value for thelabelrecord componentvalue- the value for thevaluerecord componenticon- the value for theiconrecord componentaspect- the value for theaspectrecord componentcolor- the value for thecolorrecord componentsection- the value for thesectionrecord component
-
-
Method Details
-
idPartSetting
-
idAspectProperty
-
idVariableCard
-
idExtra
Part types must build the identifiers of their own entries with this, so that they can not collide with the entries of another part type or of another section.- Parameters:
section- The section that the entry belongs to.key- A name for the entry that is unique within the part type.- Returns:
- The identifier of that entry.
-
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). -
id
-
group
-
label
-
value
-
icon
-
aspect
-
color
-
section
-