Class FluidMixerBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractTickingBlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractAirHandlingBlockEntity
me.desht.pneumaticcraft.common.block.entity.FluidMixerBlockEntity
- All Implemented Interfaces:
IGUIButtonSensitive,ILuaMethodProvider,IMinWorkingPressure,IRedstoneControl<FluidMixerBlockEntity>,ISerializableTanks,IDescSynced,IUpgradeHolder,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class FluidMixerBlockEntity
extends AbstractAirHandlingBlockEntity
implements IMinWorkingPressure, IRedstoneControl<FluidMixerBlockEntity>, net.minecraft.world.MenuProvider, ISerializableTanks
-
Nested Class Summary
Nested classes/interfaces inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
AbstractPneumaticCraftBlockEntity.UpgradeHandlerNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsFields inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractAirHandlingBlockEntity
airHandlerFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionFluidMixerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptiondefault voidstatic voidcacheRecipeFluids(List<FluidMixerRecipe> values) booleancanConnectPneumatic(net.minecraft.core.Direction side) Checks if the given side of this BE can be pneumatically connected to.static voidnet.minecraft.world.inventory.AbstractContainerMenucreateMenu(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.world.entity.player.Player player) floatFor machines which use recipes, get the synced recipe ID client-side for informational purposes@NotNull net.minecraftforge.common.util.LazyOptional<net.minecraftforge.fluids.capability.IFluidHandler>getFluidCap(net.minecraft.core.Direction side) net.minecraftforge.fluids.IFluidTanknet.minecraftforge.fluids.IFluidTankprotected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler>getInventoryCap(net.minecraft.core.Direction side) floatGet the minimum pressure at which this machine can operate.net.minecraftforge.fluids.IFluidTanknet.minecraftforge.items.IItemHandlerGet the redstone controller object for this BEGet a mapping of all tanks; this maps a tag name, which is used as the serialization key, to a fluid tank.voidhandleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) booleanstatic booleanisFluidAccepted(net.minecraft.world.level.material.Fluid fluid) Is this fluid in any of the fluid mixer's recipe ingredients?static booleanisFluidMatch(net.minecraft.world.level.material.Fluid fluid1, net.minecraft.world.level.material.Fluid fluid2) Are the two fluids compatible in the fluid mixer?voidload(net.minecraft.nbt.CompoundTag tag) voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidvoidCalled on both server and client, before anything elsevoiddefault inttryEjectLiquid(AbstractPneumaticCraftBlockEntity te, net.minecraftforge.fluids.capability.IFluidHandler handler, net.minecraft.core.Direction dir, int amount) Methods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractAirHandlingBlockEntity
addAir, addLuaMethods, getCapability, getCriticalPressure, getDangerPressure, getDefaultVolume, getPressure, handleUpdateTag, hasNoConnectedAirHandlers, initializeHullAirHandlerClient, initializeHullAirHandlers, onBlockRotated, onLoad, onNeighborBlockUpdate, onUpgradesChanged, readFromPacket, setRemoved, writeToPacketMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractTickingBlockEntity
tickCommonPostMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
countPlayersUsing, getCachedNeighbor, getContentsToDrop, getCustomName, getDescriptionFields, getDisplayName, getEnergyCap, getHeatCap, getLuaMethodRegistry, getModelData, getName, getPeripheralType, getPosition, getRotation, getSpeedMultiplierFromUpgrades, getSpeedUsageMultiplierFromUpgrades, getUpdateTag, getUpgradeCache, getUpgradeHandler, getUpgrades, isGuiUseableByPlayer, nonNullLevel, onDescUpdate, onGuiUpdate, onNeighborTileUpdate, requestModelDataUpdate, sendDescriptionPacket, serializeExtraItemData, setChanged, setCustomName, setPreserveStateOnBreak, shouldPreserveStateOnBreak, shouldRerenderChunkOnDescUpdate, shouldSyncField, updateNeighboursMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getRenderBoundingBox, hasCustomOutlineRendering, onDataPacket, serializeNBTMethods inherited from interface me.desht.pneumaticcraft.common.block.entity.IRedstoneControl
getCurrentRedstonePower, getRedstoneMode, getRedstoneTabTitle, onRedstoneModeChangedMethods inherited from interface me.desht.pneumaticcraft.common.block.entity.ISerializableTanks
deserializeTanks, serializeTanksMethods inherited from interface net.minecraft.world.MenuProvider
getDisplayNameMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
craftingProgress
public int craftingProgress -
maxProgress
public int maxProgress -
didWork
public boolean didWork
-
-
Constructor Details
-
FluidMixerBlockEntity
public FluidMixerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
tickCommonPre
public void tickCommonPre()Description copied from class:AbstractTickingBlockEntityCalled on both server and client, before anything else- Overrides:
tickCommonPrein classAbstractAirHandlingBlockEntity
-
tickClient
public void tickClient()- Overrides:
tickClientin classAbstractTickingBlockEntity
-
tickServer
public void tickServer()- Overrides:
tickServerin classAbstractTickingBlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classAbstractAirHandlingBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classAbstractAirHandlingBlockEntity
-
getCurrentRecipeIdSynced
Description copied from class:AbstractPneumaticCraftBlockEntityFor machines which use recipes, get the synced recipe ID client-side for informational purposes- Overrides:
getCurrentRecipeIdSyncedin classAbstractPneumaticCraftBlockEntity- Returns:
- the recipe id (in string form), or the empty string if no current recipe or not applicable
-
hasOutputSpace
public boolean hasOutputSpace() -
getPrimaryInventory
public net.minecraftforge.items.IItemHandler getPrimaryInventory()- Specified by:
getPrimaryInventoryin classAbstractPneumaticCraftBlockEntity
-
getInventoryCap
@Nonnull protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> getInventoryCap(net.minecraft.core.Direction side) - Overrides:
getInventoryCapin classAbstractPneumaticCraftBlockEntity
-
getFluidCap
@NotNull public @NotNull net.minecraftforge.common.util.LazyOptional<net.minecraftforge.fluids.capability.IFluidHandler> getFluidCap(net.minecraft.core.Direction side) - Overrides:
getFluidCapin classAbstractPneumaticCraftBlockEntity
-
canConnectPneumatic
public boolean canConnectPneumatic(net.minecraft.core.Direction side) Description copied from class:AbstractAirHandlingBlockEntityChecks if the given side of this BE can be pneumatically connected to.- Overrides:
canConnectPneumaticin classAbstractAirHandlingBlockEntity- Parameters:
side- the side to check- Returns:
- true if connected, false otherwise
-
clearCachedFluids
public static void clearCachedFluids() -
cacheRecipeFluids
-
isFluidAccepted
public static boolean isFluidAccepted(net.minecraft.world.level.material.Fluid fluid) Is this fluid in any of the fluid mixer's recipe ingredients?- Parameters:
fluid- the fluid to test- Returns:
- true if the fluid is accepted by the mixer at all, false otherwise
-
isFluidMatch
public static boolean isFluidMatch(net.minecraft.world.level.material.Fluid fluid1, net.minecraft.world.level.material.Fluid fluid2) Are the two fluids compatible in the fluid mixer?- Parameters:
fluid1- the first fluidfluid2- the second fluid- Returns:
- true if the fluids can be combine in the mixer, false otherwise
-
getMinWorkingPressure
public float getMinWorkingPressure()Description copied from interface:IMinWorkingPressureGet the minimum pressure at which this machine can operate. Used for GUI display purposes (drawing the yellow region of the pressure gauge, but can also be checked elsewhere.- Specified by:
getMinWorkingPressurein interfaceIMinWorkingPressure- Returns:
- the minimum pressure at which this machine can operate
-
createMenu
@Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.world.entity.player.Player player) - Specified by:
createMenuin interfacenet.minecraft.world.inventory.MenuConstructor
-
handleGUIButtonPress
public void handleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) - Specified by:
handleGUIButtonPressin interfaceIGUIButtonSensitive- Overrides:
handleGUIButtonPressin classAbstractPneumaticCraftBlockEntity
-
getRedstoneController
Description copied from interface:IRedstoneControlGet the redstone controller object for this BE- Specified by:
getRedstoneControllerin interfaceIRedstoneControl<FluidMixerBlockEntity>- Returns:
- the redstone controller
-
getSerializableTanks
Description copied from interface:ISerializableTanksGet a mapping of all tanks; this maps a tag name, which is used as the serialization key, to a fluid tank.- Specified by:
getSerializableTanksin interfaceISerializableTanks- Returns:
- a map of tag names to tanks
-
getInputTank1
public net.minecraftforge.fluids.IFluidTank getInputTank1() -
getInputTank2
public net.minecraftforge.fluids.IFluidTank getInputTank2() -
getOutputTank
public net.minecraftforge.fluids.IFluidTank getOutputTank() -
getCraftingPercentage
public float getCraftingPercentage() -
autoExportFluid
-
tryEjectLiquid
default int tryEjectLiquid(AbstractPneumaticCraftBlockEntity te, net.minecraftforge.fluids.capability.IFluidHandler handler, net.minecraft.core.Direction dir, int amount)
-