Class AirCannonBlockEntity
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.AirCannonBlockEntity
- All Implemented Interfaces:
IGUIButtonSensitive,ILuaMethodProvider,IMinWorkingPressure,IRedstoneControl<AirCannonBlockEntity>,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 AirCannonBlockEntity
extends AbstractAirHandlingBlockEntity
implements IMinWorkingPressure, IRedstoneControl<AirCannonBlockEntity>, IGUIButtonSensitive, net.minecraft.world.MenuProvider
-
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
FieldsModifier and TypeFieldDescriptionbooleanbooleanintintintintfloatbooleanfloatFields 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
ConstructorsConstructorDescriptionAirCannonBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLuaMethods(LuaMethodRegistry registry) Called lazily to populate the method registry with the methods.booleancanConnectPneumatic(net.minecraft.core.Direction side) Checks if the given side of this BE can be pneumatically connected to.net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int i, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) floatgetForce()protected 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.items.IItemHandlerGet the redstone controller object for this BEnet.minecraft.network.chat.MutableComponentvoidhandleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) booleanvoidload(net.minecraft.nbt.CompoundTag tag) voidonNeighborBlockUpdate(net.minecraft.core.BlockPos fromPos) Called when a neighboring block changes state (i.e.voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidCalled on both server and client, before anything elsevoidMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractAirHandlingBlockEntity
addAir, getCapability, getCriticalPressure, getDangerPressure, getDefaultVolume, getPressure, handleUpdateTag, hasNoConnectedAirHandlers, initializeHullAirHandlerClient, initializeHullAirHandlers, invalidateCaps, onBlockRotated, onLoad, onUpgradesChanged, readFromPacket, reviveCaps, setRemoved, writeToPacketMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractTickingBlockEntity
tickClient, tickCommonPostMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
countPlayersUsing, getCachedNeighbor, getContentsToDrop, getCurrentRecipeIdSynced, getCustomName, getDescriptionFields, getDisplayName, getEnergyCap, getFluidCap, 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, 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, onRedstoneModeChangedMethods inherited from interface net.minecraft.world.MenuProvider
getDisplayNameMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
rotationAngle
public float rotationAngle -
heightAngle
public float heightAngle -
forceMult
public int forceMult -
doneTurning
public boolean doneTurning -
gpsX
public int gpsX -
gpsY
public int gpsY -
gpsZ
public int gpsZ -
coordWithinReach
public boolean coordWithinReach -
insertingInventoryHasSpace
public boolean insertingInventoryHasSpace
-
-
Constructor Details
-
AirCannonBlockEntity
public AirCannonBlockEntity(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
-
tickServer
public void tickServer()- Overrides:
tickServerin classAbstractTickingBlockEntity
-
hasCoordinate
public boolean hasCoordinate() -
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
-
getForce
public float getForce() -
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classAbstractAirHandlingBlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classAbstractAirHandlingBlockEntity
-
createMenu
@Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int i, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) - Specified by:
createMenuin interfacenet.minecraft.world.inventory.MenuConstructor
-
getRedstoneController
Description copied from interface:IRedstoneControlGet the redstone controller object for this BE- Specified by:
getRedstoneControllerin interfaceIRedstoneControl<AirCannonBlockEntity>- Returns:
- the redstone controller
-
handleGUIButtonPress
public void handleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) - Specified by:
handleGUIButtonPressin interfaceIGUIButtonSensitive- Overrides:
handleGUIButtonPressin classAbstractPneumaticCraftBlockEntity
-
onNeighborBlockUpdate
public void onNeighborBlockUpdate(net.minecraft.core.BlockPos fromPos) Description copied from class:AbstractPneumaticCraftBlockEntityCalled when a neighboring block changes state (i.e. blockstate update)- Overrides:
onNeighborBlockUpdatein classAbstractAirHandlingBlockEntity- Parameters:
fromPos- the blockpos of the block that caused this update
-
addLuaMethods
Description copied from interface:ILuaMethodProviderCalled lazily to populate the method registry with the methods.- Specified by:
addLuaMethodsin interfaceILuaMethodProvider- Overrides:
addLuaMethodsin classAbstractAirHandlingBlockEntity- Parameters:
registry- the registry to populate
-
getInventoryCap
protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> getInventoryCap(net.minecraft.core.Direction side) - Overrides:
getInventoryCapin classAbstractPneumaticCraftBlockEntity
-
getPrimaryInventory
public net.minecraftforge.items.IItemHandler getPrimaryInventory()- Specified by:
getPrimaryInventoryin classAbstractPneumaticCraftBlockEntity
-
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
-
getRedstoneTabTitle
public net.minecraft.network.chat.MutableComponent getRedstoneTabTitle()- Specified by:
getRedstoneTabTitlein interfaceIRedstoneControl<AirCannonBlockEntity>
-