Class AphorismTileBlockEntity
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.AphorismTileBlockEntity
- All Implemented Interfaces:
IGUIButtonSensitive,ILuaMethodProvider,IDescSynced,IUpgradeHolder,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>
-
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 TypeFieldDescriptionintintintstatic final Stringstatic final Stringstatic final Stringstatic final StringintFields 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
ConstructorsConstructorDescriptionAphorismTileBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionintintnet.minecraft.world.item.ItemStackgetIconAt(int line) byteintgetMaxLineWidth(boolean editing) net.minecraftforge.items.IItemHandlerString[]booleanbooleanisRedstoneLine(int line) voidintvoidreadFromPacket(net.minecraft.nbt.CompoundTag tag) Encoded into the description packet.voidserializeExtraItemData(net.minecraft.nbt.CompoundTag blockEntityTag, boolean preserveState) Get any extra data to be serialized onto a dropped item stack.voidsetBackgroundColor(int color) voidsetBorderColor(int color) voidsetCursorPos(int cursorX, int cursorY) voidsetInvisible(boolean invisible) voidsetMarginSize(int marginSize) voidsetTextLines(String[] textLines) voidsetTextLines(String[] textLines, boolean notifyClient) booleanShould 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.voidwriteToPacket(net.minecraft.nbt.CompoundTag tag) Encoded into the description packet.Methods 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, getRotation, getSpeedMultiplierFromUpgrades, getSpeedUsageMultiplierFromUpgrades, getUpdateTag, getUpgradeCache, getUpgradeHandler, getUpgrades, handleGUIButtonPress, handleUpdateTag, isGuiUseableByPlayer, load, nonNullLevel, onBlockRotated, onDescUpdate, onGuiUpdate, onLoad, onNeighborBlockUpdate, onNeighborTileUpdate, onUpgradesChanged, requestModelDataUpdate, saveAdditional, sendDescriptionPacket, setChanged, setCustomName, setPreserveStateOnBreak, setRemoved, 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 net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
NBT_BORDER_COLOR
- See Also:
-
NBT_BACKGROUND_COLOR
- See Also:
-
NBT_TEXT_LINES
- See Also:
-
NBT_MARGIN
- See Also:
-
textRotation
public int textRotation -
currentRedstonePower
public int currentRedstonePower -
cursorX
public int cursorX -
cursorY
public int cursorY
-
-
Constructor Details
-
AphorismTileBlockEntity
public AphorismTileBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getPrimaryInventory
public net.minecraftforge.items.IItemHandler getPrimaryInventory()- Specified by:
getPrimaryInventoryin 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
-
serializeExtraItemData
public void serializeExtraItemData(net.minecraft.nbt.CompoundTag blockEntityTag, boolean preserveState) Description copied from class:AbstractPneumaticCraftBlockEntityGet any extra data to be serialized onto a dropped item stack. The supplied tag is the "BlockEntityTag" subtag of the item's NBT data, so will be automatically deserialized into the BE (i.e. available toBlockEntity.load(CompoundTag)method) when the itemblock is next placed.- Overrides:
serializeExtraItemDatain classAbstractPneumaticCraftBlockEntity- Parameters:
blockEntityTag- the existing "BlockEntityTag" subtag to add data topreserveState- true when dropped with a wrench, false when broken with a pickaxe etc.
-
writeToPacket
public void writeToPacket(net.minecraft.nbt.CompoundTag tag) Description copied from class:AbstractPneumaticCraftBlockEntityEncoded into the description packet. Also included in saved data written byBlockEntity.saveAdditional(CompoundTag)Prefer to use @DescSynced where possible - use this either for complex fields not handled by @DescSynced, or for non-ticking tile entities.- Specified by:
writeToPacketin interfaceIDescSynced- Overrides:
writeToPacketin classAbstractPneumaticCraftBlockEntity- Parameters:
tag- NBT tag
-
readFromPacket
public void readFromPacket(net.minecraft.nbt.CompoundTag tag) Description copied from class:AbstractPneumaticCraftBlockEntityEncoded into the description packet. Also included in saved data read byAbstractPneumaticCraftBlockEntity.load(CompoundTag). Prefer to use @DescSynced where possible - use this either for complex fields not handled by @DescSynced, or for non-ticking tile entities.- Specified by:
readFromPacketin interfaceIDescSynced- Overrides:
readFromPacketin classAbstractPneumaticCraftBlockEntity- Parameters:
tag- NBT tag
-
getTextLines
-
setTextLines
-
setTextLines
-
getIconAt
public net.minecraft.world.item.ItemStack getIconAt(int line) -
isRedstoneLine
public boolean isRedstoneLine(int line) -
setBorderColor
public void setBorderColor(int color) -
getBorderColor
public int getBorderColor() -
getBackgroundColor
public int getBackgroundColor() -
setBackgroundColor
public void setBackgroundColor(int color) -
getMarginSize
public byte getMarginSize() -
setMarginSize
public void setMarginSize(int marginSize) -
isInvisible
public boolean isInvisible() -
setInvisible
public void setInvisible(boolean invisible) -
getMaxLineWidth
public int getMaxLineWidth(boolean editing) -
needMaxLineWidthRecalc
public void needMaxLineWidthRecalc() -
pollRedstone
public int pollRedstone() -
getCursorPos
-
setCursorPos
public void setCursorPos(int cursorX, int cursorY)
-