Record Class ForgeFluidContainer
java.lang.Object
java.lang.Record
earth.terrarium.botarium.forge.fluid.ForgeFluidContainer
- All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider
public record ForgeFluidContainer(BotariumFluidBlock<?> fluidGetter, net.minecraft.world.level.block.entity.BlockEntity entity)
extends Record
implements net.minecraftforge.common.capabilities.ICapabilityProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionForgeFluidContainer(BotariumFluidBlock<?> fluidGetter, net.minecraft.world.level.block.entity.BlockEntity entity) Creates an instance of aForgeFluidContainerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.entity.BlockEntityentity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefluidGetterrecord component.<T> @NotNull net.minecraftforge.common.util.LazyOptional<T>getCapability(@NotNull net.minecraftforge.common.capabilities.Capability<T> capability, @Nullable net.minecraft.core.Direction arg) final inthashCode()Returns a hash code value for this object.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 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Constructor Details
-
ForgeFluidContainer
public ForgeFluidContainer(BotariumFluidBlock<?> fluidGetter, net.minecraft.world.level.block.entity.BlockEntity entity) Creates an instance of aForgeFluidContainerrecord class.- Parameters:
fluidGetter- the value for thefluidGetterrecord componententity- the value for theentityrecord component
-
-
Method Details
-
getCapability
@NotNull public <T> @NotNull net.minecraftforge.common.util.LazyOptional<T> getCapability(@NotNull @NotNull net.minecraftforge.common.capabilities.Capability<T> capability, @Nullable @Nullable net.minecraft.core.Direction arg) - Specified by:
getCapabilityin interfacenet.minecraftforge.common.capabilities.ICapabilityProvider
-
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). -
fluidGetter
Returns the value of thefluidGetterrecord component.- Returns:
- the value of the
fluidGetterrecord component
-
entity
public net.minecraft.world.level.block.entity.BlockEntity entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-