Package com.blamejared.ironsmelters.api
Record Class SmelterType
java.lang.Object
java.lang.Record
com.blamejared.ironsmelters.api.SmelterType
public record SmelterType(net.minecraft.resources.ResourceLocation id, String displayName, Supplier<SmelterConfig> config, Map<String,Optional<SmelterType>> upgradeFrom)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<net.minecraft.resources.ResourceLocation, 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.ResourceLocation 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.ResourceLocationid()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.ResourceLocation 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
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). -
id
public net.minecraft.resources.ResourceLocation 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
-