MC Toolkit

Guides / Commands & Data

Post effects and loot pools: the two halves of one chest

A loot pool's weights decide what drops; the /posteffect command decides how it feels. Both are numbers you can check before writing the datapack.

A weighted loot pool and a /posteffect command are usually written in different files by different people, and they fail in the same way: the numbers are never checked before the datapack ships. Both are cheap to verify first.

The loot pool is arithmetic, not vibes

A pool entry has a weight, and the chance of any entry is its weight divided by the sum of all weights in that pool. There is no hidden normalisation and no minimum — a weight of 0 means the entry never rolls, and a pool whose weights sum to anything at all behaves the same way. The trap is mixing rolls: a pool with rolls: 2 samples twice, so an entry with a quarter of the weight appears in roughly half of all chests, not a quarter.

EntryWeightShare of one roll
Iron ingot2020 ÷ 40 = 50%
Gold ingot1230%
Diamond820%

Add a fourth entry at weight 40 and every number above halves. That is the whole balancing job, and it is why "the diamond rate feels wrong" is almost always a weight you forgot to scale.

Loot tables are one of the larger registry families in the game — the 26.3 data this site measures lists 1,447 of them — so a pool you cannot reason about numerically is a pool you will never finish tuning by hand.

/posteffect is new in Java 26.3

Java's /posteffect arrived as a release command in 26.3 and does not exist in 26.2 or earlier. It is a Java command, and Bedrock has nothing by that name, so a Java tutorial here will not port.

The command adds or removes a screen effect by identifier on a set of players — /posteffect add <targets> <effect>, plus remove, clear <targets> and list <target> (one player). There is no strength argument: an effect is on or off. The vanilla client ships only five — blur, creeper, entity_outline, invert and spider — so the identifier list is short enough to check by hand rather than guess. Naming an effect that does not exist still reports success, because the server does not check it, which is the second reason to verify before committing.

Where the two meet

A chest that drops a rare item and a chest that drops a common one should not look identical. Roll the pool first to get the real distribution, then pick the post effect that matches how often the player will actually see it. Doing it in the other order produces a dramatic effect that fires constantly, which reads as noise.

For a town build, that usually means a subtle effect such as blur on the common pool and a dramatic one such as invert reserved for the entry with the smallest weight — the same ratio you already computed.

Build the /posteffect command and roll the weighted pool in the Post Effect & Loot Tools.

Post Effect & Loot Tools →

More guides

Browse all →