abstractTileEntityBase
Hierarchy
- TileEntityBase
Implements
- TileEntity
Indexable
Index
Constructors
Properties
- __clientMethods
- __containerEvents
- __initialized
- __networkEvents
- _clickPrevented
- _runInit
- blockID
- blockSource
- click
- client
- container
- containerEvents
- data
- defaultValues
- dimension
- events
- getGuiScreen
- isLoaded
- liquidStorage
- networkData
- networkEntity
- networkEntityType
- networkEntityTypeName
- noupdate
- onConnectionPlayer
- onDisconnectionPlayer
- region
- remove
- sendPacket
- sendResponse
- update
- useNetworkItemContainer
- x
- y
- z
Methods
Constructors
constructor
Returns TileEntityBase
Properties
__clientMethods
Type declaration
[key string]: boolean
__containerEvents
Type declaration
[key string]: Side
__initialized
__networkEvents
Type declaration
[key string]: Side
private_clickPrevented
private_runInit
readonlyblockID
blockSource
click
Type declaration
Parameters
id: number
count: number
data: number
coords: ItemUseCoordinates
player: number
extra: ItemExtraData
Returns boolean | void
client
Type declaration
containerEvents: {}
[eventName string]: (container: ItemContainer, window: UI.IWindow | null, windowContent: UI.WindowContent | null, eventData: any) => void
events: {}
[packetName string]: (packetData: any, packetExtra: any) => void
load: () => void
Returns void
tick: () => void
Returns void
unload: () => void
Returns void
container
containerEvents
Type declaration
[eventName string]: (container: ItemContainer, window: UI.IWindow | null, windowContent: UI.WindowContent | null, eventData: any) => void
data
Type declaration
[key string]: any
defaultValues
Type declaration
readonlydimension
events
Type declaration
[packetName string]: (packetData: any, packetExtra: any, connectedClient: NetworkClient) => void
getGuiScreen
Type declaration
Returns Nullable<IWindow>
isLoaded
liquidStorage
networkData
networkEntity
networkEntityType
networkEntityTypeName
noupdate
optionalonConnectionPlayer
Type declaration
Parameters
client: NetworkClient
Returns void
optionalonDisconnectionPlayer
Type declaration
Parameters
client: NetworkClient
Returns void
region
remove
sendPacket
Type declaration
Parameters
name: string
data: object
Returns {}
sendResponse
Type declaration
Parameters
packetName: string
someData: object
Returns {}
update
Type declaration
Returns void
readonlyuseNetworkItemContainer
x
y
z
Methods
clientLoad
Called when the client copy is created
Returns void
clientTick
Called every tick on client thread
Returns void
clientUnload
Called on destroying the client copy
Returns void
created
Returns void
destroy
Returns boolean
destroyBlock
Parameters
coords: ItemUseCoordinates
player: number
Returns void
getScreenByName
Parameters
screenName: string
container: ItemContainer
Returns IWindow
getScreenName
Parameters
player: number
coords: ItemUseCoordinates
Returns string
init
Returns void
load
Returns void
onCheckerTick
Parameters
isInitialized: boolean
isLoaded: boolean
wasLoaded: boolean
Returns void
onCreate
Called when a TileEntity is created
Returns void
onInit
Called when a TileEntity is initialised in the world
Returns void
onItemClick
Parameters
id: number
count: number
data: number
coords: ItemUseCoordinates
player: number
extra: ItemExtraData
Returns boolean
onItemUse
Called when player uses some item on a TileEntity. Replaces "click" function.
Parameters
coords: ItemUseCoordinates
item: ItemStack
player: number
Returns boolean
true if should prevent opening UI.
onLoad
Called when a chunk with TileEntity is loaded
Returns void
onRedstoneUpdate
Occurs when redstone signal on TileEntity block was updated
Parameters
signal: number
signal power (0-15)
Returns void
onTick
Called every tick and should be used for all the updates of the TileEntity
Returns void
onUnload
Called when a chunk with TileEntity is unloaded
Returns void
preventClick
Prevents all actions on click
Returns void
projectileHit
Parameters
coords: ItemUseCoordinates
target: ProjectileHitTarget
Returns void
redstone
Parameters
params: { onLoad: boolean; power: number; signal: number }
onLoad: boolean
power: number
signal: number
Returns void
requireMoreLiquid
Parameters
liquid: string
amount: number
Returns void
selfDestroy
Returns void
setLiquidScale
Parameters
container: any
window: any
content: any
data: { amount: number; liquid: string; scale: string }
amount: number
liquid: string
scale: string
Returns void
tick
Returns void
unload
Returns void
updateLiquidScale
Parameters
scale: string
liquid: string
Returns void
Interface for BlockSource of the TileEntity. Provides more functionality.