I'm sick rn.
Fabric API 0.77.1 contains yet another Object Builder breaking changes, to FabricMaterialBuilder
and BlockSetTypeRegistry
. A crash in Loot API was fixed in 0.77.2.
Unrelated to snapshots, but: last week, Fabric Networking API received a big update. Check https://gist.github.com/apple502j/9c6b9e5e8dec37cbf6f3916472a79d57 for more info.
Material
is confirmed to be removed at some point in the near future, to be replaced with block settings. This snapshot brought changes to further reduce use of Material
. Namely, the Material#isLiquid
is moved to BlockState#isLiquid
, and several materials were removed. The current materials are:
PLANT
AGGREGATE
WOOD
STONE
GLASS
ALLOWS_MOVEMENT_LIGHT_PASSES_THROUGH_NOT_SOLID_REPLACEABLE
ALLOWS_MOVEMENT_LIGHT_PASSES_THROUGH_NOT_SOLID
ALLOWS_MOVEMENT
LIGHT_PASSES_THROUGH
COBWEB
NOT_SOLID_ALLOWS_MOVEMENT
GENERIC
Material-based block checks should now use tags or instanceof
.
Other block related changes:
BlockSetType
now hascanOpenByHand
field, andBlockSetTypeRegistry
now takes this parameter.DoorBlock#isWoodenDoor
methods were renamed tocanOpenByHand
.Block#canMobSpawnInside
now takes one parameter,state
.- New interface
Crop
is used to mark a crop that is plantable on a farmland.CropBlock
implements this interface, so you don't have to implement yourself in most cases.
Code modifying ItemStack
should now use the combined methods (such as copyWithCount
) instead of 2 method calls (such as copy
+ setCount
) to properly handle empty stacks. ItemStack#copyAndEmpty
was added to move the contents of one stack into a new copy.
Predicates and item modifiers (or, in legacy terms, loot conditions and loot functions) are now managed by LootManager
. They are identified using LootDataKey
, similar to RegistryKey
. getTable
is renamed to getLootTable
, and getElement
can be used to get loot tables, predicates, or item modifiers.
IceBlock#getMeltedState
to return the ice's melted state, which can be frosted using Frost Walker (i.e. water).KeyCodes#isToggle
to check if a key code is used for toggling input.Entity#getNameLabelHeight
to return the offset for name label.JsonDataLoader#load
to load JSON data using Gson deserialization.