Package com.wdiscute.artisan.upgrades
Record Class MachineUpgrade
java.lang.Object
java.lang.Record
com.wdiscute.artisan.upgrades.MachineUpgrade
public record MachineUpgrade(List<net.minecraft.world.level.block.entity.BlockEntityType<?>> machines, List<AbstractUpgrade> upgrades)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MachineUpgrade> static final MachineUpgrade -
Constructor Summary
ConstructorsConstructorDescriptionMachineUpgrade(List<net.minecraft.world.level.block.entity.BlockEntityType<?>> machines, AbstractUpgrade upgrade) MachineUpgrade(List<net.minecraft.world.level.block.entity.BlockEntityType<?>> machines, List<AbstractUpgrade> upgrades) Creates an instance of aMachineUpgraderecord class.MachineUpgrade(net.minecraft.world.level.block.entity.BlockEntityType<?> machine) MachineUpgrade(net.minecraft.world.level.block.entity.BlockEntityType<?> machine, AbstractUpgrade upgrade) MachineUpgrade(net.minecraft.world.level.block.entity.BlockEntityType<?> machine, List<AbstractUpgrade> upgrades) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.List<net.minecraft.world.level.block.entity.BlockEntityType<?>> machines()Returns the value of themachinesrecord component.final StringtoString()Returns a string representation of this record class.upgrades()Returns the value of theupgradesrecord component.
-
Field Details
-
EMPTY
-
CODEC
-
-
Constructor Details
-
MachineUpgrade
public MachineUpgrade(net.minecraft.world.level.block.entity.BlockEntityType<?> machine, AbstractUpgrade upgrade) -
MachineUpgrade
public MachineUpgrade(net.minecraft.world.level.block.entity.BlockEntityType<?> machine) -
MachineUpgrade
public MachineUpgrade(List<net.minecraft.world.level.block.entity.BlockEntityType<?>> machines, AbstractUpgrade upgrade) -
MachineUpgrade
public MachineUpgrade(net.minecraft.world.level.block.entity.BlockEntityType<?> machine, List<AbstractUpgrade> upgrades) -
MachineUpgrade
public MachineUpgrade(List<net.minecraft.world.level.block.entity.BlockEntityType<?>> machines, List<AbstractUpgrade> upgrades) Creates an instance of aMachineUpgraderecord class.- Parameters:
machines- the value for themachinesrecord componentupgrades- the value for theupgradesrecord component
-
-
Method Details
-
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). -
machines
Returns the value of themachinesrecord component.- Returns:
- the value of the
machinesrecord component
-
upgrades
Returns the value of theupgradesrecord component.- Returns:
- the value of the
upgradesrecord component
-