Record Class SmelterType
java.lang.Object
java.lang.Record
com.blamejared.ironsmelters.api.SmelterType
public record SmelterType(net.minecraft.resources.Identifier id, String displayName, Supplier<SmelterConfig> config, Map<String, Optional<SmelterType>> upgradeFrom)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<net.minecraft.resources.Identifier, SmelterType> static final com.mojang.serialization.Codec<SmelterType> static final SmelterTypestatic final SmelterTypestatic final SmelterTypestatic final SmelterTypestatic final SmelterType -
Constructor Summary
ConstructorsConstructorDescriptionSmelterType(net.minecraft.resources.Identifier id, String displayName, Supplier<SmelterConfig> config, Map<String, Optional<SmelterType>> upgradeFrom) Creates an instance of aSmelterTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the value of theconfigrecord component.net.minecraft.network.chat.MutableComponentReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupgradeFromrecord component.
-
Field Details
-
ALL
-
COPPER
-
IRON
-
GOLD
-
DIAMOND
-
OBSIDIAN
-
CODEC
-
-
Constructor Details
-
SmelterType
public SmelterType(net.minecraft.resources.Identifier id, String displayName, Supplier<SmelterConfig> config, Map<String, Optional<SmelterType>> upgradeFrom) Creates an instance of aSmelterTyperecord class.- Parameters:
id- the value for theidrecord componentdisplayName- the value for thedisplayNamerecord componentconfig- the value for theconfigrecord componentupgradeFrom- the value for theupgradeFromrecord component
-
-
Method Details
-
displayComponent
public net.minecraft.network.chat.MutableComponent displayComponent() -
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
public net.minecraft.resources.Identifier id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
upgradeFrom
Returns the value of theupgradeFromrecord component.- Returns:
- the value of the
upgradeFromrecord component
-