Finish port to 1.20.5-pre1 ()

* Buildscript changes

* Particle API: port and some refactor

* Add support for Ingredient in FabricBrewingRecipeRegistry

* Add private ctor to ClientPlayerBlockBreakEvents

Not related to port, but something I've found during the process.
Also adds final to CommonLifecycleEvents.

* Fix Sound API testmod

* Fix broken javadocs

* Codec-related changes

* Document behavior of SUCCESS_NO_ITEM_USED in UseEntityCallback

* Add getEnabledFeatures

* checkstyle
This commit is contained in:
apple502j 2024-04-14 21:26:09 +09:00 committed by GitHub
parent 8f5205a8a1
commit c5fc38b3f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 198 additions and 108 deletions
fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/entity

View file

@ -71,11 +71,11 @@ public final class FabricDefaultAttributeRegistry {
* <p>If a registration overrides another, a debug log message will be emitted. Existing registrations
* can be checked at {@link net.minecraft.entity.attribute.DefaultAttributeRegistry#hasDefinitionFor(EntityType)}.</p>
*
* <p>For convenience, this can also be done on the {@link FabricEntityTypeBuilder} to simplify the building process.
* <p>For convenience, this can also be done on the {@link FabricEntityType.Builder} to simplify the building process.
*
* @param type the entity type
* @param container the container for the default attribute
* @see FabricEntityTypeBuilder.Living#defaultAttributes(Supplier)
* @see FabricEntityType.Builder.Living#defaultAttributes(Supplier)
*/
public static void register(EntityType<? extends LivingEntity> type, DefaultAttributeContainer container) {
if (DefaultAttributeRegistryAccessor.getRegistry().put(type, container) != null) {

View file

@ -115,7 +115,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
* @param <T> the type of entity
*
* @return a new living entity type builder
* @deprecated use {@link FabricEntityType.Builder#createLiving(UnaryOperator)}
* @deprecated use {@link FabricEntityType.Builder#createLiving(EntityType.EntityFactory, SpawnGroup, UnaryOperator)}
*/
@Deprecated
public static <T extends LivingEntity> FabricEntityTypeBuilder.Living<T> createLiving() {
@ -128,7 +128,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
* @param <T> the type of entity
*
* @return a new mob entity type builder
* @deprecated use {@link FabricEntityType.Builder#createMob(UnaryOperator)}
* @deprecated use {@link FabricEntityType.Builder#createMob(EntityType.EntityFactory, SpawnGroup, UnaryOperator)}
*/
public static <T extends MobEntity> FabricEntityTypeBuilder.Mob<T> createMob() {
return new FabricEntityTypeBuilder.Mob<>(SpawnGroup.MISC, FabricEntityTypeBuilder::emptyFactory);
@ -203,7 +203,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
* @param dimensions the dimensions representing the entity's size
*
* @return this builder for chaining
* @deprecated use {@link EntityType.Builder#setDimensions(float, float)}
* @deprecated use {@link EntityType.Builder#dimensions(float, float)}
*/
@Deprecated
public FabricEntityTypeBuilder<T> dimensions(EntityDimensions dimensions) {
@ -347,7 +347,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
* An extended version of {@link FabricEntityTypeBuilder} with support for features on present on {@link LivingEntity living entities}, such as default attributes.
*
* @param <T> Entity class.
* @deprecated use {@link EntityType.Builder#createLiving(UnaryOperator)}
* @deprecated use {@link EntityType.Builder#createLiving(EntityType.EntityFactory, SpawnGroup, UnaryOperator)}
*/
@Deprecated
public static class Living<T extends LivingEntity> extends FabricEntityTypeBuilder<T> {
@ -606,7 +606,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
* <p>This is used by mobs to determine whether Minecraft should spawn an entity within a certain context.
*
* @return this builder for chaining.
* @deprecated use {@link FabricEntityType.Builder.Mob#spawnRestriction(SpawnRestriction.Location, Heightmap.Type, SpawnRestriction.SpawnPredicate)}
* @deprecated use {@link FabricEntityType.Builder.Mob#spawnRestriction(SpawnLocation, Heightmap.Type, SpawnRestriction.SpawnPredicate)}
*/
@Deprecated
public FabricEntityTypeBuilder.Mob<T> spawnRestriction(SpawnLocation spawnLocation, Heightmap.Type heightmap, SpawnRestriction.SpawnPredicate<T> spawnPredicate) {