Class ElectrostaticCompressorBlockEntity
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.ElectrostaticCompressorBlockEntity
- All Implemented Interfaces:
IGUIButtonSensitive,ILuaMethodProvider,IRedstoneControl<ElectrostaticCompressorBlockEntity>,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 ElectrostaticCompressorBlockEntity
extends AbstractAirHandlingBlockEntity
implements IRedstoneControl<ElectrostaticCompressorBlockEntity>, 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 TypeFieldDescriptionintintstatic final intFields 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
ConstructorsConstructorDescriptionElectrostaticCompressorBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConnectPneumatic(net.minecraft.core.Direction dir) 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) voidgetElectrostaticGrid(Set<net.minecraft.core.BlockPos> grid, Set<ElectrostaticCompressorBlockEntity> compressors, net.minecraft.core.BlockPos pos) Scan surrounding blocks, adding all connected iron bars and electrostatic compressors to the gridnet.minecraftforge.items.IItemHandlerGet the redstone controller object for this BEintvoidhandleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) voidCalled on both server and client, before anything elsevoidMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractAirHandlingBlockEntity
addAir, addLuaMethods, getCapability, getCriticalPressure, getDangerPressure, getDefaultVolume, getPressure, handleUpdateTag, hasNoConnectedAirHandlers, initializeHullAirHandlerClient, initializeHullAirHandlers, load, onBlockRotated, onLoad, onNeighborBlockUpdate, onUpgradesChanged, readFromPacket, saveAdditional, 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, getInventoryCap, 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 net.minecraft.world.MenuProvider
getDisplayNameMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
MAX_ELECTROSTATIC_GRID_SIZE
public static final int MAX_ELECTROSTATIC_GRID_SIZE- See Also:
-
rsController
-
ironBarsBeneath
public int ironBarsBeneath -
ironBarsAbove
public int ironBarsAbove
-
-
Constructor Details
-
ElectrostaticCompressorBlockEntity
public ElectrostaticCompressorBlockEntity(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
-
getStrikeChance
public int getStrikeChance() -
canConnectPneumatic
public boolean canConnectPneumatic(net.minecraft.core.Direction dir) Description copied from class:AbstractAirHandlingBlockEntityChecks if the given side of this BE can be pneumatically connected to.- Overrides:
canConnectPneumaticin classAbstractAirHandlingBlockEntity- Parameters:
dir- the side to check- Returns:
- true if connected, false otherwise
-
handleGUIButtonPress
public void handleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) - Specified by:
handleGUIButtonPressin interfaceIGUIButtonSensitive- Overrides:
handleGUIButtonPressin classAbstractPneumaticCraftBlockEntity
-
getPrimaryInventory
public net.minecraftforge.items.IItemHandler getPrimaryInventory()- Specified by:
getPrimaryInventoryin classAbstractPneumaticCraftBlockEntity
-
getElectrostaticGrid
public void getElectrostaticGrid(Set<net.minecraft.core.BlockPos> grid, Set<ElectrostaticCompressorBlockEntity> compressors, net.minecraft.core.BlockPos pos) Scan surrounding blocks, adding all connected iron bars and electrostatic compressors to the grid- Parameters:
grid- set of all block positions (compressors and grid)compressors- set of all compressor positionspos- the position to start searching from
-
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<ElectrostaticCompressorBlockEntity>- Returns:
- the redstone controller
-