[WIP] [Scripting] New JS based scripting roadmap
olee opened this issue ยท 7 comments
We are currently working at a completely new scripting interface which will be JS based and replace the old scripting system asap. It will provide probably all features you could imagine, as it works with Java JS Engine nashorn (on Java 8) or Rhino (< Java 8) plus a simple access layer between JS and MC / FE.
Souce is here
Typescript d.ts for writing error-free scripts with TAB-completion in any TS compatible editor
(Typescript is basically JS on steroids and allows for proper code-completion and error checking - I would advise anyone to use it to write scripts)
Features:
- Calling commands from JS
- Getting command arguments in JS
- Command to call scripts from MC
- Typescript definition file for TS support
- Command handling + registration
- Support for setTimeout/setInterval
- Constructors
- Handle MC events with scripts
- @olee Improve event handling
- @olee Upgrading of old scripts - needs to handle PatternCommands (the json ones)
- Improve script upgrading with missing mapped methods / arguments
- @olee localStorage support
- @olee Direct TS compilation support (if possible)
- @Techjar Access layers
- EntityPlayer
- Entity hierarchy
- Inventory
- TileEntity
- AxisAlignedBB
- FE Wallet
- ItemStack
- Enchantments
- @olee NBT Tags
- Ore Dictionary
- ICommandSender
- Permissions
- Zones
- World manipulation (WorldServer, setBlock, etc.)
- Server administration (kick, ban, difficulty, etc.)
Requesting "CustomServerItems" mod support/integration with the new scripting system, please.
hmn... That mod has not been updated in 11 months.
Did not even know it existed.
Oh yeah I made this one and it is really useful for server customization. Though it could really need an update to 1.8.9 and 1.10.2.
This also sounds like a perfect test case for script integration with other mods.
We are pretty close to finishing the first stable version of this new feature now.
Lots of wrappers have been added and a lot of stuff can already be done with the new scripting.
After a bit more work on the script upgrading to handle all old script methods / -arguments, this will be closed and we will start on making improvements / adding new features.