{"id":16374991,"url":"https://github.com/moderocky/craftscript","last_synced_at":"2026-06-08T08:33:36.266Z","repository":{"id":175917083,"uuid":"654679621","full_name":"Moderocky/CraftScript","owner":"Moderocky","description":"A tiny scripting language for writing user-centered scripts in minecraft.","archived":false,"fork":false,"pushed_at":"2024-03-10T09:54:19.000Z","size":484,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-29T01:29:26.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Moderocky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-16T17:14:42.000Z","updated_at":"2024-03-03T09:27:24.000Z","dependencies_parsed_at":"2024-03-10T10:40:51.264Z","dependency_job_id":"3446e331-3ed1-4209-ad7b-55ae4f3dd3f0","html_url":"https://github.com/Moderocky/CraftScript","commit_stats":null,"previous_names":["moderocky/craftscript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Moderocky/CraftScript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FCraftScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FCraftScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FCraftScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FCraftScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moderocky","download_url":"https://codeload.github.com/Moderocky/CraftScript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FCraftScript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34055249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T03:19:02.312Z","updated_at":"2026-06-08T08:33:36.237Z","avatar_url":"https://github.com/Moderocky.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"CraftScript\n=====\n\n### Opus #26\n\nA tiny scripting language for writing user-centered scripts in Minecraft.\n\n## Documentation\n\nComprehensive language documentation (and some introductory tutorials) are\navailable [here](https://craftscript.kenzie.mx).\n\n## Maven Information\n\n```xml\n\n\u003crepository\u003e\n    \u003cid\u003ekenzie\u003c/id\u003e\n    \u003cname\u003eKenzie's Repository\u003c/name\u003e\n    \u003curl\u003ehttps://repo.kenzie.mx/releases\u003c/url\u003e\n\u003c/repository\u003e\n``` \n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003emx.kenzie\u003c/groupId\u003e\n    \u003cartifactId\u003ecraftscript\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Introduction\n\nCraftScript is a contextualised, functional script engine.\nIt can function either as an interpreted scripting language or a compiled programming language.\n\nIt is designed for the game 'Minecraft' to run small, non-invasive scripts from the context of a player.\nHowever, the parser and script engine are easy to modify or extend so that domains may create their own additional\nfunctionality.\n\nIts principle feature is the 'context' -- the situation and environment that code is running in, including the\nvariables, functions and keywords that are available during runtime.\nThis allows for an unusual form of *ad hoc* polymorphism: the same interpreted code can be used to do an entirely\ndifferent thing\ndepending on its context.\nRather than overloading two separate functions (e.g. `fn(int)` and `fn(string)`) CraftScript can feed different\nparameters, variables, known types and even language keywords to an executable statement.\n\n## Motivations\n\nCraftScript was designed for players in the game 'Minecraft' to write scripts to be run from their in-game avatar.\n\nWith this in mind, the actions available in a script are limited to what the executor is capable of doing.\nThis adds a layer of safety to the language, since a player's permissions can be limited in order to prevent destructive\nactions.\n\nI made CraftScript for a public server in which users can write, upload and run their own scripts in order\nto create macros or special behaviour.\n\nThe language is designed to be fairly simple but also unambiguous, and imitates the style of Minecraft's native\ncommands, selectors and keys. \\\nThere is some deviation from this, since CraftScript has several features that do not exist in the `.mcfunction` format.\n\n## Language Type\n\nScripts are designed to be interpreted into an executable structure.\nHowever, in some situations it may be preferable to compile the script into a JVM class.\n\nCurrently, there is one built-in simple script compiler.\nThis turns a script into bytecode that can be saved in the Java class format or loaded directly into the machine.\nWhile this does allow a script to be stored and loaded significantly more quickly, it still requires CraftScript as a\ndependency to run.\n\nThe simple script compiler assembles the executable statements _in situ_ -- when they are required -- rather than\nstoring them ahead of time.\n\nThis has the advantages of not keeping all the statement objects in memory and potentially benefiting from some JVM\noptimisation, however, if the JVM is unable to optimise it properly, it will require more CPU resources and could be\nslower to execute than an interpreted script. This is because the memory block has to be allocated for a statement\nbefore it can be run.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderocky%2Fcraftscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoderocky%2Fcraftscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderocky%2Fcraftscript/lists"}