Skip to content

Translation notice

This page was translated with machine translation and may contain inaccuracies. If you can help improve it, please open an issue or submit a pull request.

Featured

leather sword

Using data pack to make a compiler or interpreter: taking the C language subset C-Minus as an example'

This article introduces the concept of a compiler and the basic characteristics of mcfunction as a computer language, and demonstrates how to use data pack to create a compiler (interpreter) from a high-level language to mcfunction by implementing a complete compiler of C language subset C-Minus. At the same time, this article also provides a method for data pack to identify strings (as a lexical analyzer), a way to build an automaton (as a syntax analyzer), an intermediate language representation that can be translated into command execution, a code editor based on dialog, and an intermediate language display with highlighting, etc.

Vanilla News Mojang Spotlight

Alumopper

Vanilla News - November 2025

This month’s update is more versatile, more destructive, and more countermeasures, and overall it’s at the “Super Large Cup” level. The technical content of this month's snapshot mainly revolves around a new content - environmental attributes. At the same time, some minor modifications and additions have been made to the main gameplay content of 1.21.11.

Insights

Xuanyu 1725

Workflow of core shader (Part 2)

The first two articles are based on the shader in Minecraft and basically clarify the relevant knowledge points of the rendering pipeline. This knowledge is basically common in other graphics fields. This article follows the previous two articles and sorts out and explains the remaining content that better reflects the characteristics of Minecraft shaders. This part is equivalent to learning the rendering pipeline design of Minecraft, and it also talks about some common concepts in the field of graphics.

Hong

The use of queues in data pack

This article introduces the method of using queues in Minecraft data pack. The queue is a first-in, first-out data structure. Through the example of automatically loading a crossbow, this article demonstrates how to construct a queue and an operation queue in the data pack, and introduces the expansion of the same abstract thinking - the construction and comprehensive application of the stack.

Xu Muxian

Dialog multi-input control design based on bitwise operations and multi-base encoding

The operation and submission behavior of the dialog are always restricted by the player's permission level. For this reason, command must be used in the click event.`/trigger`, but a scoreboardcommand can only submit one score at a time, which is a limitation for dialogs with multiple input controls. This article uses bitwise operations and multi-digit encoding on the dialog input control, and applies it to the actual developed data pack.

Antares

A method and simple example of directional particle emission under the particle command

The conventional particle command can only generate scattered particles and cannot precisely control its direction of movement. However, when the particle quantity parameter is set to 0, the game will calculate the position coordinate and velocity parameters in the instruction and convert the result directly into the initial momentum of the particle. Although the "commandparticle" page on the wiki explains this, its content does not conform to the actual phenomenon that occurs in the game. This study clearly reveals the core principles of this phenomenon through systematic testing and analysis.

Woo woo 228766

How to create a reloading animation through model mapping?

This article introduces an animation implementation method through the model mapping mechanism, which can be achieved by using only resource pack. Based on this principle, it provides a script for generating animation tweened models.

Powered by VitePress and GitHub Pages