All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Update to 1.21
- The datapack now requires 1.21.
Expanded the standard library
- Many new builtin functions (A full list can be found here)
- The proc data type, which allows functions to be passed as values
- Curly brace syntax for blocks
- The runtime/extensions API
- A default runtime for quickly running programs
- The GolemScript language has been separated from Code of Copper
- It is now a standalone datapack library
- This allows it to be easily extended using the new API
- This datapack now uses the
glm
namespace
- Forward slashes are now allowed in the id of resources
- Question marks are now allowed in the body of alphanumerics
- Calling functions with the incorrect number of arguments is no longer undefined behaviour
- All code relating to Code of Copper
- As this datapack is now just a library for GolemScript
- All code to do with copper golems and the various structures found in Code of Copper, is still in the Code of Copper datapack
- Experimental, unstable support for extensions.
- This should only impact datapack developers wishing to add their own functions.
- No other changes made so far.
Overhauled the entire language.
- Custom Functions
- Function definitions
- Function calls
- return keyword
- Stdlib Functions
- random: to genereate random numbers
- time: to get the current gametime
- Var keyword for global variables
- Assignment operators such as += and -=
- Booleans
- Constants
- Resource literal
- << and >> operators
- Objects can be indexed with dot (.) notation
- Other miscellaneous operators
- Rewrote all documentation
- Now contains every language feature
- Better documented and easier to understand
- Available here
- Many instructions are now built in functions
- You can now use functions such as getblock inside expressions
- $INVENTORY and $POS are now functions: inventory() and pos()
- pos() now returns an object, instead of an array
- inventory() now returns a array of resources, rather than strings
- Variables only exist within the scope that they are created
- Predicates updated to use 1.20 format
- The entire interpreter was re-written from the ground up
- It should now be far more reliable going forwards
- Place now takes a resource rather than a slot number
- Minus operator no longer removes items from objects/arrays
- Regex matcher is now correctly passed a string's value
- Backslashes, unless escaping
/
, no longer need to be escaped themselves.
We rewrote the entire interpreter.
- Resource literal
- Added << and >> operators
- Objects can be indexed with dot (.) notation
- Predicates updated to use 1.20 format
- The entire interpreter was re-written from the ground up
- It should now be far more reliable going forwards
- Place now takes a resource rather than a slot number
- Minus operator no longer removes items from objects/arrays
- Custom functions now can be called from expressions.
Fix all the stupid bugs of 0.3.0-alpha-1
- Constants
- Prevent running bots with compile errors
- Bot no longer loses error messages when recompiling programs
- Return not exiting functions
- Functions can be called within expressions
- Functions called within functions return values properly
- Random function is now actually random
- Functions can be defined and called with no arguments/parameters
Functions
- Functions
- Function definitions
- Function calls
- return keyword
- Var keyword for global variables
- Assignment operators such as += and -=
- Booleans
- Many instructions are now built in functions
- Variables only exist within the scope that they are created
Lots of unit tests and fixed bugs after the interpreter refactor
- Regex matcher is now correctly passed a string's value
- Backslashes, unless escaping
/
, no longer need to be escaped themselves. - $INVENTORY and $POS variables now parse correctly again
- Array indexing with negtive numbers, starting from the end of the list
- Unit tests for literal and expression evaluation
- Integration test module for testing instructions
- This can be placed by running
/function bot:spec/place
- This can be placed by running
Pipelines and progression
- Oxidisation Based Progression
- Golems will oxidise over time whilst executing programs
- This can be prevented by waxing a Golem with honeycomb
- Wax, and oxidisation, can be scraped off a Golem with an axe
- When scraping rust off a fully oxidised golem, the player is rewarded with the next example program
- Golems will oxidise over time whilst executing programs
- Refactor of the interpreter
- Golems now uses a pipeline, saving on lag
- Golems now execute instructions at 10Hz
- Modified loot tables to work with new progression system
Escaping, interaction improvements, position variable, and break instruction.
$POS
variablebreak
instruction\
as escape for strings and regexes- Escaped
"
are replaced by”
as to not break tellraw
- Escaped
- README has now been greatly improved
- Golem now uses item and text display entities
- Golem model and texture revamp
- New interaction system:
- Right click to run a Golem, or with a book to assign a program.
- Left click to stop a Golem
- Crouching whilst looking at the Golem allows it's inventory to be accessed, or for it to be broken.
- Containers not dropping their contents when broken by a golem
- Items not dropping when the golem's inventory is full
Two new literal types, and cleanup of syntax.
- Object variant of literal
- Alphanumeric pseudo-variant of literal
- Only allows [A-Za-z0-9_]
- First character must match [A-Za-z]
- Regex variant of literal
- String-regex matching using the
match
function
- String-regex matching using the
- Let now takes an alphanumeric literal in the name field, rather than a string.
- Variables no longer need a "$" in front of the name
- Fixed blocks not dropping while the golem was running the break command
- Tools can no longer go below zero durability
Refactor of the parser, fixing many compiler bugs.
- Major refactor of the parser:
- Variables within arrays no longer need brackets if they use only alphanumeric characters.
- Operators no longer need a space between them and literals.
- Lots of behind-the-scenes improvements which will allow for later enhancements.
- Most instructions will allow expressions as their parameters.
- Golems now don't print quotes when printing plain strings.
- Golems no longer fall through non-full blocks.
- Golems now reset their variables when the program reruns.
- Items no longer disappear weirdly when placing from the second slot.
Various bug fixes, and a new language feature.
- Literal parameters, eg.
$(array)[0]
. - A dev mode, where you can see what's happening behind the scenes (not fully implemented).
- New example programs to demonstrate parameters and the now useful INVENTORY variable
- Range for place and getblock commands is now 5.
- Arrays no longer close the literal early.
- Golem's display armor stand now has locked slots to prevent interaction.
- Golem can no longer break bedrock and other unbreakable blocks.
- Golem no longer breaks the block underneath the one it's supposed to.
- Golem can no longer float in the air by constantly calling the move command.
- Multiple golems can place blocks in the same tick
Various bug fixes, and small additions.
- String addition example program.
- Print function will now correctly show more complex data structures.
- If statements no longer remove the following instruction.
Various bug fixes.
- If statements no longer terminate a while loop.
- Print command now works from within a while loop.
- Blocks now correctly change when placed.
Initial release!
- Copper Golems.
- GolemScript Language Parser.
- GolemScript Language Interpreter.
- Skyship, Bunker, Laboratory and Gears structures.