Record Class OrResearchMethod
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.impl.research.method.OrResearchMethod
- All Implemented Interfaces:
ResearchMethod,ResearchMethodList
public record OrResearchMethod(List<ResearchMethod> methods)
extends Record
implements ResearchMethodList
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.portingdeadmods.researchd.api.research.methods.ResearchMethod
ResearchMethod.MethodContext, ResearchMethod.SimpleMethodContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final ResearchMethodSerializer<OrResearchMethod> -
Constructor Summary
ConstructorsConstructorDescriptionOrResearchMethod(List<ResearchMethod> methods) Creates an instance of aOrResearchMethodrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatfinal inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()methods()Returns the value of themethodsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.portingdeadmods.researchd.api.research.methods.ResearchMethod
getTranslation, shouldCheckProgressMethods inherited from interface com.portingdeadmods.researchd.api.research.methods.ResearchMethodList
checkProgress
-
Field Details
-
SERIALIZER
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
OrResearchMethod
Creates an instance of aOrResearchMethodrecord class.- Parameters:
methods- the value for themethodsrecord component
-
-
Method Details
-
getMaxProgress
public float getMaxProgress()- Specified by:
getMaxProgressin interfaceResearchMethod
-
createProgress
- Specified by:
createProgressin interfaceResearchMethod
-
id
public net.minecraft.resources.ResourceLocation id()- Specified by:
idin interfaceResearchMethod
-
getSerializer
- Specified by:
getSerializerin interfaceResearchMethod
-
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). -
methods
Returns the value of themethodsrecord component.- Specified by:
methodsin interfaceResearchMethodList- Returns:
- the value of the
methodsrecord component
-