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.
ResultConsumeris replaced with context-awareResultStorerin many places. Methods were renamed accordingly.CommandManager#executemethods no longer returnintreturn 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#throwerwas renamed tothrowerUuid, and a field for the entity, now namedthrower, was added.setThrowernow takes an entity.- Various non-living entities (including projectiles and TNT) received
copyFromoverride to copy the owner. If you have a custom non-living entity, make sure to follow the same! Entity#getScoreboardTeamnow returnsTeam, notAbstractTeam.PlayerEntity#getReachDistancestatic method was added. This returns the reach distance for the player.
AbstractBlock#onStateReplacedimplementations for block entities were consolidated toItemScatterer#onStateReplaced. Make sure to callsuperAFTER callingItemScatterer.SignBlockEntity#getInteractionFailSoundwas added, returning interaction fail sound.FireBlock#registerFlammableBlockis now public.Colors#LIGHT_REDwas added.- Herobrine was removed.