Record Class ResearchMethodType
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.api.research.methods.ResearchMethodType
public record ResearchMethodType(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, boolean parentType)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionResearchMethodType(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, boolean parentType) Creates an instance of aResearchMethodTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.chat.ComponentgetName()final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.static ResearchMethodTypemultiple(net.minecraft.resources.ResourceLocation id, ResearchIcon icon) booleanReturns the value of theparentTyperecord component.static ResearchMethodTypesingle(net.minecraft.resources.ResourceLocation id, ResearchIcon icon) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResearchMethodType
public ResearchMethodType(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, boolean parentType) Creates an instance of aResearchMethodTyperecord class.- Parameters:
id- the value for theidrecord componenticon- the value for theiconrecord componentparentType- the value for theparentTyperecord component
-
-
Method Details
-
getName
public net.minecraft.network.chat.Component getName() -
single
public static ResearchMethodType single(net.minecraft.resources.ResourceLocation id, ResearchIcon icon) -
multiple
public static ResearchMethodType multiple(net.minecraft.resources.ResourceLocation id, ResearchIcon icon) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
parentType
public boolean parentType()Returns the value of theparentTyperecord component.- Returns:
- the value of the
parentTyperecord component
-