Skip to content

Instantly share code, notes, and snippets.

  • Acacia A programming language that runs in Minecraft BE by compiling into commands
  • Andesite Minecraft java and bedrock library
  • Anvil Cloud-ready multiplatform minecraft development framework
  • Allay The next-generation Minecraft: Bedrock Edition server software
  • Allay A parser to convert a descriptive text format into minecraft text components
  • Allium A Discord Bot focused on the Minecraft Modding Scene
  • Amethyst Native c++ modding for MCBE 1.21.0.3 for building client side mods
  • Axolotl Free & Open-Source Minecraft Mod (and related infrastructure) for use in PvP and other Scenarios
  • Azalea A collection of Rust crates for making Minecraft bots, c
  1. Add a walking_slowdown field to consumable to control the amount of slowdown while consuming the item.
  2. Add a slots field to death_protection to control when the protection is active.
  3. Add a consume_on_use (boolean) field to death_protection to control whether the item is consumed or not.
  4. Also allow individually choosing which attribute modifier is shown in the tooltip.
  5. Also allow individually choosing which enchantment is shown in the tooltip, either through the component or through the enchantment definition.
  6. Make it possible to define a fallback model for item_model, for example using item_model={model:"foo",fallback:"bar"}.

Semantic coloring

image

Diagnostics

ffmpeg -ss 00:00:02 -to 00:00:12 -i Code_PfzjrlljPt.mp4 -vf "fps=5,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=none" -loop 0 diagnostics.gif

diagnostics

Document link

Optimizing and code-splitting

I decided to investigate the bundle size for misode.github.io and was quite shocked. After code splitting and tree shaking I managed to get the total JS output size from 5.22MB down to 3.95MB, and the main entrypoint from 4.53MB down to 703KB.

Initial bundle

The initial bundle was 5.22MB, with the main chunk 4.53MB (the red part). The only chunks split up were the different languages localizations. image

Remove unused highlight.js languages

One of the first things I noticed was that highlight.js included a bunch of languages, while I'm only using JSON. This eliminated 1.35MB. image

Custom data pack structures in 1.18.2

This guide will showcase how to create a data pack that adds a custom structure to the world. There is also a data pack download of this complete example.

Always leave the world and rejoin to apply the new changes!

⚠️ This guide has moved ⚠️

Updates for both 1.18.2 and 1.19 can be found at https://misode.github.io/guides/adding-custom-structures/

Pack.mcmeta

@misode
misode / full_noise.jsonc
Last active February 16, 2022 23:09
Density functions in 22w07a
{
"type": "min",
"input_1": {
"type": "squeeze",
"input": {
"type": "mul",
"input_1": {
"type": "interpolated",
"input": {
"type": "blend",
PROPS = {
"instrument": [
"harp",
"basedrum",
"snare",
"hat",
"bass",
"flute",
"bell",
"guitar",

Loot Context

Uses

Functions

  • looting_enchant: killer_entity
  • set_name only if entity is set: this_entity, killer_entity, direct_killer_entity, or last_damage_player
  • exploration_map: origin
  • copy_name depending on the value of source: this_entity, killer_entity, last_damage_player, or block_entity
  • apply_bonus: tool

command | Added the /jfr command, along with the --jfrProfile startup option

text font | Added illageralt rule-like font from Minecraft Dungeons

loot item-modifier | The set_contents and set_loot_table functions now require a type field with a valid block entity type

pack-format | Data pack format has been increased to 8

command scoreboard | Removed length limits for scoreboard objectives, score holders (fake players), and team names

@misode
misode / WorldgenExporter.java
Created August 10, 2021 23:44
Fabric mod using Mojang mappings to export worldgen settings, only tested on the 1.18 experimental snapshots.
package net.misode.worldgenexporter;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.mojang.serialization.Codec;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.JsonOps;
import net.fabricmc.api.ModInitializer;