API version this mod uses - not present = 0
The name of the mod to be displayed when the mod produces chat messages
Optional
dependenciesOptional dependencies on other mods
The ID of the mod, used as a namespace - this is mandatory, without it a mod won't load
The name of the mod to be displayed in the config dialog - this is mandatory, without it a mod won't load
The version of the mod
Optional
generateImplement this function if the mod wants to be the world generator. The first mod found with this method implemented will be used to regenerate the map when its reset. If no mod is found with this function then default world generation is used.
The context on which the mod can callback to modify the game.
The width of the map being generated
The height of the map being generated
The seed being used
Optional
onNotification that a mob is blocked by a particular location
The context on which the mod can callback to modify the game.
The mob blocked by the location
The x coordinate in tiles of the location blocking
The y coordinate in tiles of the location blocking
MobContext
Optional
onNotification of when the game starts altogether. This is a good place to add/change assets, tools and blocks since it happens first in the lifecycle.
The context on which the mod can callback to modify the game.
Optional
onNotification that a mob is hitting their head on a particular location
The context on which the mod can callback to modify the game.
The mob hitting their head on the location
The x coordinate in tiles of the location being hit
The y coordinate in tiles of the location being hit
MobContext
Optional
onNotification when the mod has been loaded/installed. Be careful what you call here since most of the system may not be available
The context on which the mod can callback to modify the game.
Optional
onNotification that a mob joined the world
The game being joined
The mob that joined the game
Optional
onNotification that a mob used a tool in is progress at a given location
The context on which the mod can callback to modify the game.
The mob using the tool on the location
The x coordinate in tiles of the target
The y coordinate in tiles of the target
The layer being targeted (0=foreground, 1=background)
The id of the tool being used (as defined when doing an
Optional
onNotification that a player has selected a tool
The game in which the player existing
The player in the world
The ID of the tool selected
Optional
onNotification that a tile has been changed in the game. Every time any player updates the world the notification will callback into the mod.
The context on which the mod can callback to modify the game.
The mob making the change if any (when mod make changes they don't have a mob)
The x coordinate in tiles of the change
The y coordinate in tiles of the change
The layer the change is taking place on (0=foreground, 1=background)
The block that has been placed on the map (or 0 for removal)
The block that was in this location previously
MobContext
Optional
onNotification that a mob is standing on a particular location
The context on which the mod can callback to modify the game.
The mob standing on the location
The x coordinate in tiles of the location being stood on
The y coordinate in tiles of the location being stood on
MobContext
Optional
onWhen implemented in a mod this will be called every frame (or tick). This can be used to do dynamic updates based on time.
The context on which the mod can callback to modify the game.
Optional
onNotification that a previously scheduled timer fired
The game to callback on to to make changes
The name of the callback that was registered with the timer
Optional
tileX: numberThe x coordinate of the optional tile location this time was associated with
Optional
tileY: numberThe y coordinate of the optional tile location this time was associated with
Optional
layer: numberThe layer of optional tile location this time was associated with
Optional
onNotification that a mob pressed the trigger button on a particular location.
The context on which the mod can callback to modify the game.
The mob pressing the trigger on the location
The x coordinate in tiles of the target
The y coordinate in tiles of the target
MobContext
Optional
onNotification that a mob used a tool on a given location
The context on which the mod can callback to modify the game.
The mob using the tool on the location
The x coordinate in tiles of the target
The y coordinate in tiles of the target
The layer being targeted (0=foreground, 1=background)
The id of the tool being used (as defined when doing an
Optional
onNotification that a new world has been generated
The context on which the mod can callback to modify the game.
The width of the map being generated
The height of the map being generated
The seed being used
Optional
onNotification that the player(s) are being added to the world. This is useful to show messages and do setup that is dependent on there being a network and players (e.g. sending chat messages)
The context on which the mod can callback to modify the game.
Generated using TypeDoc
This is the interface that mods can implement to get notification of events in games. Note that mods only run on the server at the current time.