Skip to content

Instantly share code, notes, and snippets.

@apple502j
Created May 18, 2023 11:19
Show Gist options
  • Save apple502j/10072a6638538b9f96ff73f47c9eeb1d to your computer and use it in GitHub Desktop.
Save apple502j/10072a6638538b9f96ff73f47c9eeb1d to your computer and use it in GitHub Desktop.

1.20-pre2: Emptiness Update

The pre-release 2 is all about emptiness and blankness...

Fabric changes

FAPI v0.81.2 was released. No breaking change.

Minecraft changes

Emptiness (ingredients)

Ingredients may be an air to indicate empty slot. If your code uses Ingredient#fromJson, then it will automatically allow air ingredients. To keep old behavior of disallowing air ingredients (which you probably want), use fromJson overload with the boolean param set to false.

Blankness

All uses of StringUtils#isBlank are swapped to Util#isBlank. This treats certain non-breaking spaces as blank.

Commands

ServerCommandSource#sendFeedback now takes Supplier<Text> instead of Text for performance reasons. Add () -> and it should be good to go.

Other additions and changes

  • Entity#isOnRail: returns true if the entity is a minecart on a rail.
  • ChunkHolder methods that send packets now take the list of players instead of querying watching players.
  • ServerWorld#getRandomSequences to get the random sequences.
  • CommandBlockExecutor#isEditable to query if a command block can be edited.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment