Commands received the biggest change in this snapshot. With the help of the new Brigadier function and the advanced command execution implementation, commands were significantly enhanced.
Fabric API 0.90.1 was released, with no breaking changes.
There is no progress on last week's block codecs. This week, we instead saw a massive refactor in commands.
Previously, command execution was handled by Brigadier's internal methods. This did not work well for commands that invoke other commands, like execute if
and return run
. This update gave the Minecraft code more control in executing commands. Since most mods likely do not depend on this functionality, this section only describes changes, not new features.
ResultConsumer
is replaced with context-awareResultStorer
in many places. Methods were renamed accordingly.CommandManager#execute
methods no longer returnint
return values. To get the return value, useServerCommandSource#withResultStorer
.
- Boats, minecarts, and other player-constructed vehicles should now extend
VehicleEntity
. This provides the wobble effect seen when hitting that entity. ItemEntity#thrower
was renamed tothrowerUuid
, and a field for the entity, now namedthrower
, was added.setThrower
now takes an entity.- Various non-living entities (including projectiles and TNT) received
copyFrom
override to copy the owner. If you have a custom non-living entity, make sure to follow the same! Entity#getScoreboardTeam
now returnsTeam
, notAbstractTeam
.PlayerEntity#getReachDistance
static method was added. This returns the reach distance for the player.
AbstractBlock#onStateReplaced
implementations for block entities were consolidated toItemScatterer#onStateReplaced
. Make sure to callsuper
AFTER callingItemScatterer
.SignBlockEntity#getInteractionFailSound
was added, returning interaction fail sound.FireBlock#registerFlammableBlock
is now public.Colors#LIGHT_RED
was added.- Herobrine was removed.