Advancements got codecs, registries were updated, etc.
FAPI 0.90.8 released, no breaking change.
Some mob spawner logics have been moved to Spawner interface (to be implemented by spawner block entities). MobSpawnerLogic and related classes are now placed in block.spawner package. The existing Spawner interface used for spawning cats, "the worst mob", and the frequent homicide victims is now renamed to SpecialSpawner.
AbstractBlock#onExploded was added, allowing blocks to configure custom behavior for explosions. Breeze shoots "explosive" projectiles; the explosion does not damage blocks, instead Grianing them. If you have a custom block that you want to fire with this, use:
public void onExploded(BlockState state, World world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) {
if (explosion.getDestructionType() == Explosion.DestructionType.TRIGGER_BLOCK && !world.isClient())
doStuff(state, world, pos, explosion);
super.onExploded(state, world, pos, explosion, stackMerger);
}BlockSetType got canOpenByWindCharge field for custom buttons/doors/trapdoors/whatever.
RecipeProvider methods received some changes. Some JSON builders and generateCookingRecipse now require passing the constructor of recipe class, like CampfireCookingRecipe::new. Other builders, in comparison, no longer asks for the serializer.
Entity#isImmuneToExplosionnow takesExplosion.- Three
EntityPoses added: sliding, shooting, inhaling. SpawnReasongot two methods:isAnySpawner(spawner & trial spawner) andisTrialSpawner.canSpawnmethods should checkisAnySpawner, and make the entity exempt from biome/height requirements imposed for natural spawn.VehicleEntity#shouldAlwaysKillnow takesDamageSource.TntMinecartEntitygotshouldDetonate, which is called in the override.- One of the overload for
PlayerEntity#unlockRecipesnow takes a list, not an array. PersistentProjectileEntity#deflectto deflect the entity when it hits something.
ItemStackgot 4 more codecs:ADVANCEMENT_DISPLAY_CODEC(itemandnbt(stringified));RECIPE_RESULT_CODECandINGREDIENT_ENTRY_CODEC(formerly inRecipeCodecs); andCUTTING_RECIPE_RESULT_CODEC.World#createExplosioncan now take particles, emitter particles, and sound event.ExplosionS2CPacketnow contains those fields as well.- Advancements and
net.minecraft.predicatepredicates are now serialized using codecs. Registries#ROOT_KEYis moved toRegistryKeys#ROOT.- Registry loading code got a refactor, apparently to allow "patches". I don't believe this impacts modders for now.
Slot#disablesDynamicDisplayto check if clock/compass dynamic display should be disabled in the slot.falseby default,truein crafting slots.CommandExceptionwas removed. Just use brigadierDynamicCommandExceptionType. Same goes forHerobrineEntity.Text.Serialization#fromJson's overload takingStringReadercan now returnnull. It now also calls an internal Gson staticmethod, but hey, the code already uses reflection.PngMetadata#validateto validate that a file is in fact PNG.Vec3d#isWithinRangeOf, which is likeisInRangebut with horizontal/vertical separate.Codecs#createRecursivenow take the name of the codec for debugging.