Tis

Minecraft 22w16b

Another snapshot is out, adding a new music disc and some random changes. See the changelog.

Allay

The allay’s item search range increased from radius 9 (within a 16×8×16 box) to radius 32 (within a 64×32×64 box).

Allays will no longer drop items enchanted with curse of vanishing (except for the enchanted book) when they die. Allays can still pick up and deliver curse of vanishing items.

If an allay is within 16 blocks of its deposit target while idling, it will stay close to that target.

The allay’s speed multiplier while searching decreased from 2x to 1.75x, but the speed multiplier while giving items or staying near the target increased from 1.25x to 2.25x.

When the allay throws an item, the item spawns at 0.16 blocks above the bottom of the allay’s hitbox.

The unused allay dust particle was removed.

Misc

Froglights now have a strength and blast resistance of 0.3.

Disc fragments spawn in ancient cities with the same chances as echo shards.

As a side effect of the allay item sensor change, piglins now search for gold in a 9 block radius, unrestricted by the 16×8×16 box requirement in previous versions.

Sounds

Some sounds were added and removed:

- entity.allay.flap
+ entity.allay.item_thrown
+ music_disc.5
+ music.overworld.swamp
+ music.overworld.jungle_and_forest
+ music.overworld.old_growth_taiga
- entity.tadpole.eat
- entity.tadpole.step

Tags

Two tags were added:

+ blocks/frogs_spawnable_on
+ painting_variant/placeable

RNG

Some randomized events are now calculated with a Triangular Distribution instead of a Gaussian (Normal) distribution. Minecraft’s triangle distribution is symmetric.

The distribution can be defined in terms of two parameters:

  • m: the mean (average) and median (middle)
  • r: the radius between the mean and min/max values

and is calculated using doubles:

m + r * (nextDouble() - nextDouble())

The distribution looks like this:

The minimum value is m - r, and the maximum value is m + r.

The probability that the distribution will generate a number x or less (also known as the cdf of triangular random variable X) is:

Note that:

For the mathematically inclined, this is the probability density function in terms of m and r, along with some other properties:

Changed Events

Behavior Min Avg Max Radius
Dispenser initial velocity (facing y axis) 0.096635 0.2 0.303365 0.103365
Dispenser initial velocity (facing x/z axis)† 0.096635 0.25 0.403365 0.103365
Dispenser fire charge power (in facing axis)* 0.88515 1 1.11485 0.11485
Dispenser fire charge power (in other axes)* -0.11485 0 0.11485 0.11485
Blaze allowed height offset -6.391 0.5 7.391 6.891
Container item dropping initial velocity (x/z) -0.11485 0 0.11485 0.11485
Container item dropping initial velocity (y) 0.08515 0.2 0.31485 0.11485
Follow range multiplier -0.11485 0 0.11485 0.11485
Skeleton trap horse initial velocity (x/z) -1.1485 0 1.1485 1.1485
Firework rocket initial velocity (x/z) -0.002297 0 0.002297 0.002297

The blaze’s allowed height offset updates every 5 seconds. If the blaze’s target’s y position is higher than the blaze’s eye position plus the allowed height offset, the blaze will start to rise upwards.

* The fireball and fire charge power is the acceleration of the fireball in each x,y,z direction. The power values are only used to determine the direction of acceleration, since the power vector is scaled to 0.1 when the fireball spawns.

† See the dispenser initial velocity section

Blaze fireball power

The blaze fireball power (see the changed events section for an explanation) in the x and z directions is a triangular distribution with m = target pos - blaze pos (when computing power in x direction, the positions are x positions, same with z), and r = 1.1485 * sqrt(distance between blaze and target).

  • Minimum = (target pos - blaze pos) - 1.1485 * sqrt(dist)
  • Average = (target pos - blaze pos)
  • Maximum = (target pos - blaze pos) + 1.1485 * sqrt(dist)

The blaze fireball power in the y direction is always target y pos - blaze y pos.uncertainty value (10 for hard, 6 for normal, 2 for easy)

Base mob arrow damage

The base arrow damage (before enchantments) from mobs is 2p + bonus, where p is the bow’s power from 0% to 100% (based on ticks drawn back) and bonus is a triangular distribution that follows the table below:

Difficulty Min Avg Max Radius
Easy -0.46425 0.11 0.68425 0.57425
Normal -0.35425 0.22 0.79425 0.57425
Hard -0.24425 0.33 0.90425 0.57425

Projectile accuracy

When a hostile mob or a player shoots a projectile, the game introduces some inaccuracy by taking the projectile direction vector (with length 1) and adding a random offset to each coordiante. The resulting slightly modified vector is then multiplied by the projectile’s power to get the initial velocity. The random offset is a triangular distribution that follows the table below:

Shooter Min Avg Max Radius
Mobs on Easy -0.172275 0 0.172275 0.172275
Mobs on Normal -0.103365 0 0.103365 0.103365
Mobs on Hard -0.034455 0 0.034455 0.034455
Player -0.0172275 0 0.0172275 0.0172275

Dispenser initial velocity

The minimum, average, and maximum in the changed events table is correct, but there are some complications.

An item’s initial velocity when shot out of a dispenser along the x or z axis is a triangular distribution with r = 0.103365, but m is a uniform random number between 0.2 and 0.3.

The probability that the distribution will generate a number x or less is:

and the probability density function is:

This distribution is known as a compound distribution. The pdf and cdf were generated by the following expressions and Mathematica code:

r=0.103365
f[x_]=Simplify[10*Integrate[Piecewise[{ {(x-(a-r))/Power[r,2],a-r<x<=a}, {-(x-(a+r))/Power[r,2],a<x<a+r}, {0,True}}],{a,0.2,0.3},Assumptions->Element[a,Reals]&&Element[x,Reals]]] (*pdf*)
F[x_]=Simplify[Integrate[f[t],{t,0.2-r,x},Assumptions->Element[x,Reals]]] (*cdf*)

Edits

Feb 9 2024

  • Fire charges have their power scaled to 10% when shot, added a clarifying note.