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#isImmuneToExplosion
now takesExplosion
.- Three
EntityPose
s added: sliding, shooting, inhaling. SpawnReason
got two methods:isAnySpawner
(spawner & trial spawner) andisTrialSpawner
.canSpawn
methods should checkisAnySpawner
, and make the entity exempt from biome/height requirements imposed for natural spawn.VehicleEntity#shouldAlwaysKill
now takesDamageSource
.TntMinecartEntity
gotshouldDetonate
, which is called in the override.- One of the overload for
PlayerEntity#unlockRecipes
now takes a list, not an array. PersistentProjectileEntity#deflect
to deflect the entity when it hits something.
ItemStack
got 4 more codecs:ADVANCEMENT_DISPLAY_CODEC
(item
andnbt
(stringified));RECIPE_RESULT_CODEC
andINGREDIENT_ENTRY_CODEC
(formerly inRecipeCodecs
); andCUTTING_RECIPE_RESULT_CODEC
.World#createExplosion
can now take particles, emitter particles, and sound event.ExplosionS2CPacket
now contains those fields as well.- Advancements and
net.minecraft.predicate
predicates are now serialized using codecs. Registries#ROOT_KEY
is moved toRegistryKeys#ROOT
.- Registry loading code got a refactor, apparently to allow "patches". I don't believe this impacts modders for now.
Slot#disablesDynamicDisplay
to check if clock/compass dynamic display should be disabled in the slot.false
by default,true
in crafting slots.CommandException
was removed. Just use brigadierDynamicCommandExceptionType
. Same goes forHerobrineEntity
.Text.Serialization#fromJson
's overload takingStringReader
can now returnnull
. It now also calls an internal Gson staticmethod, but hey, the code already uses reflection.PngMetadata#validate
to validate that a file is in fact PNG.Vec3d#isWithinRangeOf
, which is likeisInRange
but with horizontal/vertical separate.Codecs#createRecursive
now take the name of the codec for debugging.