Record Class Catalyst
java.lang.Object
java.lang.Record
com.codinglitch.simpleradio.central.Catalyst
public record Catalyst(net.minecraft.resources.ResourceLocation location, net.minecraft.world.item.Item associate, float efficiency)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCatalyst(net.minecraft.resources.ResourceLocation location, net.minecraft.world.item.Item associate, float efficiency) Creates an instance of aCatalystrecord class. -
Method Summary
Modifier and TypeMethodDescriptionacceptSource(Message message) net.minecraft.world.item.ItemReturns the value of theassociaterecord component.floatReturns the value of theefficiencyrecord 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.ResourceLocationlocation()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Catalyst
public Catalyst(net.minecraft.resources.ResourceLocation location, net.minecraft.world.item.Item associate, float efficiency) Creates an instance of aCatalystrecord class.- Parameters:
location- the value for thelocationrecord componentassociate- the value for theassociaterecord componentefficiency- the value for theefficiencyrecord component
-
-
Method Details
-
acceptSource
-
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 '=='. -
location
public net.minecraft.resources.ResourceLocation location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
associate
public net.minecraft.world.item.Item associate()Returns the value of theassociaterecord component.- Returns:
- the value of the
associaterecord component
-
efficiency
public float efficiency()Returns the value of theefficiencyrecord component.- Returns:
- the value of the
efficiencyrecord component
-