Record Class EnergyStorageAttachment.Factory
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.entity.EnergyStorageAttachment.Factory
- All Implemented Interfaces:
BlockEntityAttachmentFactory
- Enclosing class:
EnergyStorageAttachment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautoOutputrecord component.intcapacity()Returns the value of thecapacityrecord component.create(BlockEntityAttachmentInfo info, KubeBlockEntity entity) final booleanIndicates whether some other object is "equal to" this one.List<net.neoforged.neoforge.capabilities.BlockCapability<?, ?>> final inthashCode()Returns a hash code value for this object.booleanReturns the value of themaxExtractrecord component.Returns the value of themaxReceiverecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Factory
public Factory(int capacity, Optional<Integer> maxReceive, Optional<Integer> maxExtract, Optional<Integer> autoOutput) Creates an instance of aFactoryrecord class.- Parameters:
capacity- the value for thecapacityrecord componentmaxReceive- the value for themaxReceiverecord componentmaxExtract- the value for themaxExtractrecord componentautoOutput- the value for theautoOutputrecord component
-
-
Method Details
-
create
- Specified by:
createin interfaceBlockEntityAttachmentFactory
-
isTicking
public boolean isTicking()- Specified by:
isTickingin interfaceBlockEntityAttachmentFactory
-
getCapabilities
- Specified by:
getCapabilitiesin interfaceBlockEntityAttachmentFactory
-
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 '=='. -
capacity
public int capacity()Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
maxReceive
Returns the value of themaxReceiverecord component.- Returns:
- the value of the
maxReceiverecord component
-
maxExtract
Returns the value of themaxExtractrecord component.- Returns:
- the value of the
maxExtractrecord component
-
autoOutput
Returns the value of theautoOutputrecord component.- Returns:
- the value of the
autoOutputrecord component
-