Class FluidTankMountedStorage
java.lang.Object
com.simibubi.create.api.contraption.storage.fluid.MountedFluidStorage
com.simibubi.create.api.contraption.storage.fluid.WrapperMountedFluidStorage<FluidTankMountedStorage.Handler>
com.simibubi.create.content.fluids.tank.storage.FluidTankMountedStorage
- All Implemented Interfaces:
SyncedMountedStorage,net.neoforged.neoforge.fluids.capability.IFluidHandler
public class FluidTankMountedStorage
extends WrapperMountedFluidStorage<FluidTankMountedStorage.Handler>
implements SyncedMountedStorage
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.neoforged.neoforge.fluids.capability.IFluidHandler
net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<FluidTankMountedStorage> Fields inherited from class com.simibubi.create.api.contraption.storage.fluid.WrapperMountedFluidStorage
wrappedFields inherited from class com.simibubi.create.api.contraption.storage.fluid.MountedFluidStorage
STREAM_CODEC, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFluidTankMountedStorage(int capacity, net.neoforged.neoforge.fluids.FluidStack stack) protectedFluidTankMountedStorage(MountedFluidStorageType<?> type, int capacity, net.neoforged.neoforge.fluids.FluidStack stack) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterSync(Contraption contraption, net.minecraft.core.BlockPos localPos) Called on the client side after this storage has been synced from the server.static FluidTankMountedStoragefromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt) static FluidTankMountedStoragefromTank(FluidTankBlockEntity tank) intnet.neoforged.neoforge.fluids.FluidStackgetFluid()booleanisDirty()voidCalled after this storage has been synced.voidunmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.level.block.entity.BlockEntity be) Un-mount this storage back into the world.Methods inherited from class com.simibubi.create.api.contraption.storage.fluid.WrapperMountedFluidStorage
drain, drain, fill, getFluidInTank, getTankCapacity, getTanks, isFluidValid
-
Field Details
-
CODEC
-
-
Constructor Details
-
FluidTankMountedStorage
protected FluidTankMountedStorage(MountedFluidStorageType<?> type, int capacity, net.neoforged.neoforge.fluids.FluidStack stack) -
FluidTankMountedStorage
protected FluidTankMountedStorage(int capacity, net.neoforged.neoforge.fluids.FluidStack stack)
-
-
Method Details
-
unmount
public void unmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity be) Description copied from class:MountedFluidStorageUn-mount this storage back into the world. The expected storage type of the target block has already been checked to make sure it matches this storage's type.- Specified by:
unmountin classMountedFluidStorage
-
getFluid
public net.neoforged.neoforge.fluids.FluidStack getFluid() -
getCapacity
public int getCapacity() -
isDirty
public boolean isDirty()- Specified by:
isDirtyin interfaceSyncedMountedStorage- Returns:
- true if this storage needs to be synced.
-
markClean
public void markClean()Description copied from interface:SyncedMountedStorageCalled after this storage has been synced.- Specified by:
markCleanin interfaceSyncedMountedStorage
-
afterSync
Description copied from interface:SyncedMountedStorageCalled on the client side after this storage has been synced from the server.- Specified by:
afterSyncin interfaceSyncedMountedStorage
-
fromTank
-
fromLegacy
public static FluidTankMountedStorage fromLegacy(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt)
-