Scripting
Input Formats
The following input formats are used in functions like addRecipe, addFuel, etc. See the javadoc entries of the functions for what format to use.
Format #1
The following inputs are allowed for this format:
- {item name} - Example "9"
- {item name}:{metadata} - Example "35:5"
- {item name} {quantity} - Example "9 64"
- {item name}:{metadata} {quantity} - Example "35:8 64"
- {alias} - Example "stone"
- {alias} {quantity} - Example "stone 64"
Format #2
The following inputs are allowed for this format:
- {item name} - Example "9"
- {item name}:{metadata} - Example "35:5"
- {alias} - Example "stone"
- :{ore dictionary class} - Example ":oreIron"
Format #3
The following inputs are allowed for this format:
- {item name} - Example "9"
- {item name}:{metadata} - Example "35:5"
- {alias} - Example "stone"
Custom Stuff 2 Script Objects
The following tables shows where the different script objects can be used.
Blocks
| config | entity | hitX | hitY | living | mod | player | position | redstoneSignal | side | world | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| onActivated | X | X | X | X | X | X | X | X | |||
| onAdded | X | X | X | X | |||||||
| onBonemeal | X | X | X | X | X | ||||||
| onBreak | X | X | X | X | |||||||
| onClicked | X | X | X | X | X | ||||||
| onCollided | X | X | X | X | X | ||||||
| onCollidedWithLiving | X | X | X | X | X | ||||||
| onCollidedWithPlayer | X | X | X | X | X | ||||||
| onDestroyedByPlayer | X | X | X | X | X | ||||||
| onFallenUpon | X | X | X | X | X | ||||||
| onNeighborChange | X | X | X | X | |||||||
| onPlaced | X | X | X | X | |||||||
| onPlacedBy | X | X | X | X | X | ||||||
| onPlacedByPlayer | X | X | X | X | X | ||||||
| onRedstoneSignal | X | X | X | X | X | ||||||
| onUpdate | X | X | X | X | |||||||
| onWalking | X | X | X | X | X | ||||||
| onWalkingLiving | X | X | X | X | X | ||||||
| onWalkingPlayer | X | X | X | X | X |
Items
| config | hitX | hitY | interactPlayer | isCurrentItem | itemstack | living | mod | player | position | side | slotId | tickCount | world | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| onBlockStartBreak | X | X | X | X | X | X | ||||||||
| onCreated | X | X | X | X | X | |||||||||
| onDroppedByPlayer | X | X | X | X | X | |||||||||
| onEaten | X | X | X | X | X | |||||||||
| onHitEntity | X | X | X | X | X | X | ||||||||
| onLeftClickLiving | X | X | X | X | X | X | ||||||||
| onLeftClickPlayer | X | X | X | X | X | X | ||||||||
| onRightClick | X | X | X | X | X | |||||||||
| onStoppedUsing | X | X | X | X | X | X | ||||||||
| onUpdate | X | X | X | X | X | X | X | |||||||
| onUse | X | X | X | X | X | X | X | X | X | |||||
| onUseFirst | X | X | X | X | X | X | X | X | X | |||||
| onUseOnEntity | X | X | X | X | X | X | ||||||||
| onUseOnPlayer | X | X | X | X | X | X | ||||||||
| onUsing | X | X | X | X | X | X |
Tile Entities
| config | itemstack | mod | position | world | |
|---|---|---|---|---|---|
| onItemSmelted | X | X | X | X | X |
GUIs
| config | mod | player | position | world | renderer | mouseX | mouseY | guiX | guiY | |
|---|---|---|---|---|---|---|---|---|---|---|
| onDraw | X | X | X | X | X | X | X | X | X | X |
Functions
The javascript functions for the different objects can be found here.