Skip to content
View imc-bot's full-sized avatar

Organizations

@insane-mc

Block or report imc-bot

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
imc-bot/README.md

Introduction

This project is still under development, API interfaces may be unstable or not supported yet.

中文文档 Chinese Docs

Usage

npm install insane-mc

Supported Features

MC Lang (Building)

Have you ever wanted make your code reusable? Have you ever dreamed of declaring mcfunctions with parameters? Have you ever been confused by the messy directories of Minecraft Datapacks?

Now introducing a new scripting language - IMC Lang, here is an example.

def tell($a) {
	tellraw @s {"text": $a}
}
@load {
	$tell("Hello,")
	$tell("World!")
}

What this code snippet does is make your datapack output Hello, World! each time it has loaded.

See API Document for more syntax.

Context

To better organize your mcfunction and JSON files, we provide feature context, that can help you pass namespace, directory, and other data via chaining calls.

For example, when you call ctx.namespace('xxx') that ctx is a context, it will return a new context with namespace set to xxx. When you declare functions or recipes, for example, using the returned context, they will be automatically created in target namespace.

We also implement a event system depended on context, to make you set callback functions or load/loop commands easily.

Recipe

Enjoy better custom crafting! You can add recipes whose product contains NBT data, and even set the number of times limit for it. We will automatically convert it to datapacks using advancement tricks.

We could even pack all your recipes into a recipe book, then you could simply use commands to give it to other players.

Advancement

The advancement feature is basically the same as it in vanilla datapacks, except that it's easier to create callbacks via our event system.

Of course, this is because our project is under development and we will bring more interesting features soon.

Pinned Loading

  1. insane-mc/imc insane-mc/imc Public

    An Insane Minecraft Compiler for Building Datapacks

    TypeScript 4 1

  2. insane-mc/docs insane-mc/docs Public

    The Document of Insane Minecraft Compiler

    TypeScript 1