Skip to content

Instantly share code, notes, and snippets.

@jacobsjo
jacobsjo / explanation.md
Last active June 3, 2024 16:25
Minecraft Aquifer Explanation

Aquifers

Minecraft uses Aquifers to determine where to place liquids and air. Without aquifers all empty space below the sea-level would be filled with water. Aquifers thus allow caves to be dry.

Global Fluid Picker

The global fluid picker is used when aquifers are disabled and in some cases with aquifers enabled.

The global fluid picker is quite simple:

  • air above the sea-level
@GentlemanRevvnar
GentlemanRevvnar / 1.18.2-custom_structures_with_jigsaws.md
Last active October 20, 2024 20:21
Simple guide for using jigsaws in custom structures in 1.18.2

Custom data pack structures with jigsaws in 1.18.2

(Last updated: 1.18.2)

This is technically a shameless rip/edit of misode's guide that shows the traditional use of newly implemented custom structure system. I myself want to tackle the jigsaw aspect a bit, hence i'm making my own guice based on his. I will show how to create a data pack that adds custom structures to the world that also utilize jigsaw blocks. So treat this as a basic jigsaw guide in world generation. There is also a data pack download of this first example.

Always leave the world and rejoin to apply the new changes! Because traditional /reload or /datapack disable & enable do not refresh changes in worldgen files!

EXAMPLE 1 - Creating a structure that uses jigsaws

Let's make a simple house with a basement and a road that will lead away from the h

@skyrising
skyrising / mojang-meta-urls.md
Last active November 16, 2024 12:18
Mojang Meta URLs

UPDATE: See: https://github.com/Arcensoth/blueprints

Blueprints

Blueprints are a text-based, human-readable/writable structure format. A blueprint compiles-down to a single NBT structure file that can be loaded with a structure block.

Note that all examples use YAML instead of JSON, but the YAML used is 1:1 convertible to/from JSON.

demo:bricks

{
"parent": "item/handheld",
"textures": {
"layer0": "item/diamond_shovel"
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
@Aerijo
Aerijo / tree_sitter_guide.md
Last active November 15, 2024 23:47
Guide to writing your first Tree-sitter grammar

Guide to your first Tree-sitter grammar

NOTE: The Tree-sitter API and documentation has changed and improved since this guide was created. I can't guarantee this is up to date.

About

Tree-sitter is the new way Atom is providing language recognition features, such as syntax highlighting, code folding, autocomplete, and more. In contrast to TextMate grammars, which work by regex matching, Tree-sitter will generate an entire syntax tree. But more on that can be found in it's own docs.

Here, we look at making one from scratch.

@Aerijo
Aerijo / making_language_grammar.md
Last active September 1, 2024 19:58
Guide to writing an Atom language grammar

A guide to writing a language grammar (TextMate) in Atom

Tree sitter

  • Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help:

@tryashtar
tryashtar / pickup-delay.md
Last active June 7, 2021 13:55
Item PickupDelay table.
Source PickupDelay
Dropped by Player 40
Player Killed 40
Block Broken 10
Mob Killed 10
Dropped by Entity 10
Ejected from Jukebox 10
Broken Container 0
Dispenser/Dropper 0
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active November 16, 2024 22:55
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux