Перейти к содержимому
Mineforgian

Code of Copper

Programmable Copper Golems. Fully text-based programming language in a vanilla datapack.

Загрузки
2K
Подписчики
51
Обновлён
21 июля 2024 г.
Лицензия
GPL-3.0-or-later

Опубликован 29 января 2023 г.

Logo

Code of Copper

Code of Copper is a lore heavy, and technically advanced Datapack. Adding a programmable Copper Golem into the game.

Throughout the world, different structures will generate, containing lore, and examples of programs that the Copper Golem can run. Programs can be written into a book, and then given to the Golem, by right clicking it with the book.

Right-clicking the Golem with an empty hand will execute it's current program.

While we recommend playing through the pack, as an addition to your world, and slowly discovering the language and features over time, if you would like a quick demo of the pack, you can use /place template bot:demo to place our demo structure.

Code of Copper is a runtime for GolemScript, the programming language used to program the Golems.

A datapack by Moxvallix, Gears and Wulfian. Enjoy!
Explore the docs »
Report Bug

Requirements

  • This datapack will only work in versions 1.20.2 and higher
  • Make sure to remember to download and install the resource pack
  • This datapack will not work without the following datapack libraries:

Installation

To install the datapack, first download the latest release from Modrinth.
You will also need GolemScript, Moxlib, and Regex.

Put these in the datapacks folder of your world. For more information, see the Minecraft wiki.

When you install the datapack, you must leave and rejoin the world (or restart the server) for all effects to properly take place.

Obtaining a Copper Golem

Golems are found in airships, which generate naturally throughout your world when you have the datapack installed. Make sure to keep your render distance up, they spawn around 200 blocks in the air!

Looking for shadows on the ground is a great way to locate airships.
Each airship contains one copper golem, alongside three example programs to help you get started with GolemScript.

If you would like to follow along with the datapack and learn the language as you go, stop reading here.

Getting started with GolemScript

GolemScript is written in Minecraft books, which are applied to the golem to give it a program.

To learn more about Code of Copper's features, see Code of Copper documentation. To learn the language, see the GolemScript documentation.

License

This project is distributed under the GPL-3.0 License. See LICENSE.md for more information.

Discord Server

You can join our discord server here.

Oxidisation and progression

After a certain number of instruction executions, the golem will begin to oxidise.

Interacting with the golem while holding an axe removes the rust.

If the golem is fully oxidised, it will not run anymore, but upon scraping it with an axe you will find example programs that explain the language of GolemScript.

This process can be avoided however, by waxing the golem. As with anything copper, you can also scrape off the wax.

Ченджлог

0.3.4Релиз1.21.1, 1.21.2, 1.21.3 · 21 июля 2024 г.

[0.3.4] - 2024-07-21

Fixed some bugs

Changed

  • Updated the place_blocks.glm example program, with new syntax.
  • Updated the resource pack such that the golem now faces direction of travel (positive X).

Fixed

  • Place no longer duplicates blocks when there's only one left.
  • Place no longer deletes fresh pickaxes if a pickaxe has been broken before.
  • Waxing a golem no longer runs the golem as well.
0.3.3Релиз1.21 · 19 июня 2024 г.

[0.3.3] - 2024-06-19

Update to 1.21

Changed

  • The datapack now requires 1.21.
0.3.2Релиз1.20.5, 1.20.6 · 27 апреля 2024 г.

[0.3.2] - 2024-04-27

Update to 1.20.5

Changed

  • The datapack now requires 1.20.5

Fixed

  • The golem now starts a program from the beginning every time it is run
0.3.1Релиз1.20.2, 1.20.3, 1.20.4 · 29 января 2024 г.

[0.3.1] - 2024-01-29

The big split

Added

  • The background of the text above the golem is now coloured based on its oxidisation level

Changed

  • The GolemScript language has been split from this datapack
    • It is now its own separate pack
    • This datapack uses its API to run programs and control the golems
  • Empty and same programs now rerun the previous program
  • Broken golems now store their oxidisation level, and whether they had been waxed

Removed

  • All code that processes the GolemScript language
    • This can now all be found in the GolemScript datapack
    • Code of Copper is now a runtime for GolemScript, and only contains code for manipulating golems
  • The experimental API
    • This is now part of the GolemScript API
0.3.1-alpha-1Альфа1.20.2 · 23 декабря 2023 г.

[0.3.0-alpha-1] - 2023-12-24

Added

  • Experimental, unstable support for extensions.
    • This should only impact datapack developers wishing to add their own functions.
    • No other changes made so far.
0.3.0Релиз1.20, 1.20.1, 1.20.2 · 26 ноября 2023 г.

[0.3.0] - 2023-11-26

Overhauled the entire language.

Added

  • Custom Functions
    • Function definitions
    • Function calls
    • return keyword
  • Stdlib Functions
    • random: to generate 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

Changed

  • 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

Fixed

  • Regex matcher is now correctly passed a string's value
  • Backslashes, unless escaping /, no longer need to be escaped themselves.
0.3.0-beta-2Бета1.20, 1.20.1 · 24 августа 2023 г.

[0.3.0-beta-2] - 2023-05-25

We rewrote the entire interpreter.

Added

  • Resource literal
  • Added << and >> operators
  • Objects can be indexed with dot (.) notation

Changed

  • 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

Fixed

  • Custom functions now can be called from expressions.
0.3.0-beta-1Бета1.19.4 · 24 мая 2023 г.

[0.3.0-beta-1] - 2023-05-25

Fix all the stupid bugs of 0.3.0-alpha-1

Added

  • Constants

Fixed

  • 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

Комментарии

Загружаем…