Tis

Minecraft 26.4 snapshot 2

The first 26.4 snapshot after Minecraft LIVE is out, no ice caves yet.

These writeups assume you have read the Official Changelog before continuing.

Table of Contents

World Generation

Mushrooms now only generate underneath motion-blocking blocks, fixing .

Data Packs

Number Providers

Changed the sin and cos float number providers to fix :

  • The input now rounds towards the nearest quantized angle, with ties rounding towards zero, instead of always rounding towards zero.
  • Negative inputs use the sin⁡(−x)=−sin⁡(x)\sin(-x) = -\sin(x) and cos⁡(−x)=cos⁡(x)\cos(-x) = \cos(x) identities.
  • The sine of 00, π/2\pi/2, π\pi, and 3π/23\pi/2 radians is exactly 0, 1, 0, and -1 respectively.
  • The cosine of 00, π/2\pi/2, π\pi, and 3π/23\pi/2 radians is exactly 1, 0, -1, and 0 respectively.

Uses the following code:

int NUM_ANGLES = 65536;
int QUADRANT_OFFSET = NUM_ANGLES / 4;
double ANGLES_PER_RADIAN = NUM_ANGLES / (2 * Math.PI);

float[] SIN = new float[NUM_ANGLES];
for (int i = 0; i < SIN.length; i++) {
  SIN[i] = (float) Math.sin(i / ANGLES_PER_RADIAN);
}
SIN[0 * QUADRANT_OFFSET] = 0.0f;
SIN[1 * QUADRANT_OFFSET] = 1.0f;
SIN[2 * QUADRANT_OFFSET] = 0.0f
SIN[3 * QUADRANT_OFFSET] = -1.0f;

float sin(float f) {
  double d = (double) f;
  return d >= 0.0
    ? SIN[(int) ((long) (d * ANGLES_PER_RADIAN + 0.5) & (long) (NUM_ANGLES - 1))]
    : -SIN[(int) ((long) (-d * ANGLES_PER_RADIAN + 0.5) & (long) (NUM_ANGLES - 1))];
}

float cos(float f) {
  double d = (double) f;
  return d >= 0.0
    ? SIN[(int) ((long) (d * ANGLES_PER_RADIAN + (double) QUADRANT_OFFSET + 0.5) & (long) (NUM_ANGLES - 1))]
    : SIN[(int) ((long) (-d * ANGLES_PER_RADIAN + (double) QUADRANT_OFFSET + 0.5) & (long) (NUM_ANGLES - 1))];
}