Agriculture.CropTile
Hierarchy
- TileEntityBase
- CropTile
Index
Constructors
Properties
- __clientMethods
- __containerEvents
- __initialized
- __networkEvents
- blockID
- blockSource
- click
- client
- container
- containerEvents
- crop
- data
- defaultValues
- dimension
- events
- getGuiScreen
- isLoaded
- liquidStorage
- networkData
- networkEntity
- networkEntityType
- networkEntityTypeName
- noupdate
- onConnectionPlayer
- onDisconnectionPlayer
- region
- remove
- sendPacket
- sendResponse
- update
- useNetworkItemContainer
- x
- y
- z
Methods
- applyFertilizer
- applyHydration
- applyWeedEx
- askCropJoinCross
- attemptCrossing
- calculateRatioFor
- checkGround
- checkPlayerRunning
- clientLoad
- clientTick
- clientUnload
- created
- destroy
- destroyBlock
- generateSeeds
- getRelativeCoords
- getScreenByName
- getScreenName
- hasWeedEX
- init
- isBlockBelow
- lim
- load
- nextGaussian
- onCheckerTick
- onCreate
- onInit
- onItemClick
- onItemUse
- onLoad
- onLongClick
- onRedstoneUpdate
- onTick
- onUnload
- performGrowthTick
- performHarvest
- performManualHarvest
- performTick
- performWeedWork
- pick
- preventClick
- projectileHit
- redstone
- renderModel
- requireMoreLiquid
- reset
- selfDestroy
- setLiquidScale
- tick
- tryPlantIn
- unload
- updateLiquidScale
- updateRender
- updateTerrainAirQuality
- updateTerrainHumidity
- updateTerrainNutrients
Constructors
constructor
Returns CropTile
Properties
__clientMethods
Type declaration
[key string]: boolean
__containerEvents
Type declaration
[key string]: Side
__initialized
__networkEvents
Type declaration
[key string]: Side
readonlyblockID
Block ID of tile.
blockSource
BlockSource object to manipulate tile position in world.
click
Called when player uses some item on a TileEntity.
Type declaration
Parameters
id: number
count: number
data: number
coords: ItemUseCoordinates
player: number
extra: ItemExtraData
Returns boolean | void
client
Client tile entity prototype copy.
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
Tile item container.
containerEvents
Events of the container on the server side.
Type declaration
[eventName string]: (container: ItemContainer, window: UI.IWindow | null, windowContent: UI.WindowContent | null, eventData: any) => void
crop
data
Tile data values object.
defaultValues
Default data values, will be initially added to TileEntity.data field.
Type declaration
crop: any
crossingBase: boolean
currentSize: number
dirty: boolean
growthPoints: number
scanLevel: number
statGain: number
statGrowth: number
statResistance: number
storageNutrients: number
storageWater: number
storageWeedEX: number
terrainAirQuality: number
terrainHumidity: number
terrainNutrients: number
readonlydimension
Dimension where the tile is located.
events
Events that receive packets on the server side.
Type declaration
[packetName string]: (packetData: any, packetExtra: any, connectedClient: NetworkClient) => void
getGuiScreen
Called to get the UI.IWindow object for the current TileEntity. The window is then opened within TileEntity.container when the player clicks it.
Client-side method only.
Type declaration
Returns IWindow
isLoaded
true if tile is loaded in the world.
liquidStorage
Tile liquid storage.
networkData
SyncedNetworkData object of the tile.
networkEntity
Instance of TileEntity.networkEntityType for the tile.
networkEntityType
NetworkEntityType object of the tile.
networkEntityTypeNamesince: 2.2.1b92
noupdate
true if tile cannot tick, update functions will
not work in that case.
optionalonConnectionPlayersince: 2.3.1b116-3
optionalonDisconnectionPlayersince: 2.3.1b116-3
Called when player disconnects from server.
Type declaration
Parameters
client: NetworkClient
Returns void
region
Interface for BlockSource of the TileEntity. Provides more functionality.
remove
true if tile has been destroyed.
sendPacket
Sends the packet from server to all clients.
Type declaration
Parameters
name: string
data: object
Returns {}
sendResponse
Sends packet to specified client.
Available only in server-side methods!
Type declaration
Parameters
packetName: string
someData: object
Returns {}
update
Called every tick to TileEntity.TileEntityPrototype.tick each tile if TileEntity.noupdate not active.
Type declaration
Returns void
readonlyuseNetworkItemContainer
Use ItemContainer that supports multiplayer.
x
X coord of the tile in it's dimension.
y
Y coord of the tile in it's dimension.
z
Z coord of the tile in it's dimension.
Methods
applyFertilizer
Parameters
manual: boolean
Returns boolean
applyHydration
Parameters
amount: number
Returns number
applyWeedEx
Parameters
stack: ItemStack
manual: boolean
Returns boolean
askCropJoinCross
Parameters
coordsArray: [number[], number[], number[], number[]]
Returns any[]
attemptCrossing
Returns boolean
calculateRatioFor
checkGround
Returns void
checkPlayerRunning
Parameters
playerUid: number
Returns void
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
playerUid: number
Returns void
generateSeeds
Parameters
data: any
Returns ItemInstance
getRelativeCoords
Returns [number[], number[], number[], number[]]
getScreenByName
Parameters
screenName: string
container: ItemContainer
Returns IWindow
getScreenName
Parameters
player: number
coords: ItemUseCoordinates
Returns string
hasWeedEX
Returns boolean
init
- That feature is obsolete
Returns void
isBlockBelow
Parameters
reqBlockID: number
Returns boolean
lim
Parameters
value: number
min: number
max: number
Returns number
loadsince: 2.0.2b29
- That feature is obsolete
Returns void
nextGaussian
Returns number
onCheckerTicksince: 2.0.2b29
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
playerUid: 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
onLongClick
Parameters
playerUid: number
Returns boolean
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
performGrowthTick
Returns void
performHarvest
Returns ItemInstance[]
performManualHarvest
Returns boolean
performTick
Returns void
performWeedWork
Returns void
pick
Returns boolean
preventClick
Prevents all actions on click
Returns void
projectileHit
Parameters
coords: ItemUseCoordinates
target: ProjectileHitTarget
Returns void
redstone
- That feature is obsolete
Parameters
params: { onLoad: boolean; power: number; signal: number }
onLoad: boolean
power: number
signal: number
Returns void
renderModel
Returns void
requireMoreLiquid
Parameters
liquid: string
amount: number
Returns void
reset
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
- That feature is obsolete
Returns void
tryPlantIn
Parameters
cropCardID: number
size: number
statGr: number
statGa: number
statRe: number
scan: number
Returns boolean
unloadsince: 2.0.2b29
- That feature is obsolete
Returns void
updateLiquidScale
Parameters
scale: string
liquid: string
Returns void
updateRender
Returns void
updateTerrainAirQuality
Returns void
updateTerrainHumidity
Returns void
updateTerrainNutrients
Returns void
Interface passed to TileEntity.registerPrototype function.