The Commander's Handbook

Logo

A community-curated collection of Minecraft map-making tricks and tips.

Sample pack using Lectern

From: https://raw.githubusercontent.com/mcbeet/lectern/main/examples/combined.md

This contains both a data pack and a resource pack.

Resource pack

Here we disable the grass block rotation randomization by creating a custom blockstate:

@blockstate minecraft:grass_block

{
  "variants": {
    "snowy=false": { "model": "block/grass_block" },
    "snowy=true": { "model": "block/grass_block_snow" }
  }
}

Note that for the snowy=false variant we removed the rotated alternatives from the original file:

{
  "variants": {
    "snowy=false": [
      { "model": "block/grass_block" },
      { "model": "block/grass_block", "y": 90 },
      { "model": "block/grass_block", "y": 180 },
      { "model": "block/grass_block", "y": 270 }
    ],
    "snowy=true": { "model": "block/grass_block_snow" }
  }
}

Refer to the Minecraft wiki for more details.

Data pack

The @data_pack directives allows us to modify the pack.mcmeta file:

@data_pack pack.mcmeta

{
  "pack": {
    "description": "hello",
    "pack_format": 7
  }
}

Next we're going to define a function:

@function demo:foo

say foo

Download

You can download the final result here:

Using entities as markers

We have a few options blah blah blah this is demo text:

Armor stands

are the laggiest but can display stuff

Area effect clouds

can double as timers

Markers

perform the best but have fewer features

Example pack using markers

but not really

DOWNLOAD HERE:


Let's start by creating a simple function:

@function tutorial:greeting

say Hello, world!

And now we can make it run when the data pack is loaded!

@function_tag minecraft:load

{
  "values": ["tutorial:greeting"]
}

Contributors