Class AbstractHopperBlockEntity<T extends net.minecraft.world.level.block.entity.BlockEntity & IRedstoneControl<T>>
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.AbstractHopperBlockEntity<T>
- All Implemented Interfaces:
IComparatorSupport,IGUIButtonSensitive,ILuaMethodProvider,IRedstoneControl<T>,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>
- Direct Known Subclasses:
LiquidHopperBlockEntity,OmnidirectionalHopperBlockEntity
public abstract class AbstractHopperBlockEntity<T extends net.minecraft.world.level.block.entity.BlockEntity & IRedstoneControl<T>>
extends AbstractTickingBlockEntity
implements IRedstoneControl<T>, IComparatorSupport, 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
FieldsFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected abstract booleandoExport(int maxItems) protected abstract booleandoImport(int maxItems) intprotected abstract intnet.minecraft.core.DirectionintintvoidhandleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) voidload(net.minecraft.nbt.CompoundTag tag) voidvoidCalled when a machine's upgrades have changed in any way.voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) protected abstract voidbooleanShould this block entity preserve its state (currently: upgrades and stored air) when broken? By default this is true when sneak-wrenched, and false when broken by pick.protected booleanvoidMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractTickingBlockEntity
tickClient, tickCommonPost, tickCommonPreMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
addLuaMethods, countPlayersUsing, getCachedNeighbor, getCapability, getContentsToDrop, getCurrentRecipeIdSynced, getCustomName, getDescriptionFields, getDisplayName, getEnergyCap, getFluidCap, getHeatCap, getInventoryCap, getLuaMethodRegistry, getModelData, getName, getPeripheralType, getPosition, getPrimaryInventory, getRotation, getSpeedMultiplierFromUpgrades, getSpeedUsageMultiplierFromUpgrades, getUpdateTag, getUpgradeCache, getUpgradeHandler, getUpgrades, handleUpdateTag, isGuiUseableByPlayer, nonNullLevel, onDescUpdate, onGuiUpdate, onLoad, onNeighborBlockUpdate, onNeighborTileUpdate, readFromPacket, requestModelDataUpdate, sendDescriptionPacket, serializeExtraItemData, setChanged, setCustomName, setPreserveStateOnBreak, setRemoved, shouldSyncField, updateNeighbours, writeToPacketMethods 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, getRedstoneController, getRedstoneMode, getRedstoneTabTitle, onRedstoneModeChangedMethods inherited from interface net.minecraft.world.inventory.MenuConstructor
createMenuMethods inherited from interface net.minecraft.world.MenuProvider
getDisplayNameMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
isCreative
public boolean isCreative
-
-
Method Details
-
getInputDirection
public net.minecraft.core.Direction getInputDirection() -
onBlockRotated
public void onBlockRotated()- Overrides:
onBlockRotatedin classAbstractPneumaticCraftBlockEntity
-
tickServer
public void tickServer()- Overrides:
tickServerin classAbstractTickingBlockEntity
-
shouldRerenderChunkOnDescUpdate
protected boolean shouldRerenderChunkOnDescUpdate()- Overrides:
shouldRerenderChunkOnDescUpdatein classAbstractPneumaticCraftBlockEntity
-
getMaxItems
public int getMaxItems() -
getItemTransferInterval
public int getItemTransferInterval() -
setupInputOutputRegions
protected abstract void setupInputOutputRegions() -
doExport
protected abstract boolean doExport(int maxItems) -
doImport
protected abstract boolean doImport(int maxItems) -
getComparatorValueInternal
protected abstract int getComparatorValueInternal() -
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classAbstractPneumaticCraftBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classAbstractPneumaticCraftBlockEntity
-
handleGUIButtonPress
public void handleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player) - Specified by:
handleGUIButtonPressin interfaceIGUIButtonSensitive- Overrides:
handleGUIButtonPressin classAbstractPneumaticCraftBlockEntity
-
doesLeaveMaterial
public boolean doesLeaveMaterial() -
getComparatorValue
public int getComparatorValue()- Specified by:
getComparatorValuein interfaceIComparatorSupport
-
onUpgradesChanged
public void onUpgradesChanged()Description copied from class:AbstractPneumaticCraftBlockEntityCalled when a machine's upgrades have changed in any way. This is also called from readNBT() when saved upgrades are deserialized, so it is not guaranteed that the world field is non-null - beware. If you override this, remember to call the super method!- Specified by:
onUpgradesChangedin interfaceIUpgradeHolder- Overrides:
onUpgradesChangedin classAbstractPneumaticCraftBlockEntity
-
shouldPreserveStateOnBreak
public boolean shouldPreserveStateOnBreak()Description copied from class:AbstractPneumaticCraftBlockEntityShould this block entity preserve its state (currently: upgrades and stored air) when broken? By default this is true when sneak-wrenched, and false when broken by pick.- Overrides:
shouldPreserveStateOnBreakin classAbstractPneumaticCraftBlockEntity- Returns:
- true if state should be preserved, false otherwise
-