From 8bda86f21ded32afd4bbffb013c40d20ec50400c Mon Sep 17 00:00:00 2001 From: asie Date: Thu, 7 Feb 2019 10:56:58 +0100 Subject: [PATCH] remove most deprecations --- .../fabric/api/block/FabricBlockSettings.java | 155 ------------------ .../api/entity/EntityTrackingRegistry.java | 10 -- .../api/entity/FabricEntityTypeBuilder.java | 23 --- 3 files changed, 188 deletions(-) diff --git a/src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java b/src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java index b5ced4869..5ccbb105a 100644 --- a/src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java +++ b/src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java @@ -186,159 +186,4 @@ public class FabricBlockSettings { public T build(Function function) { return function.apply(delegate); } - - /* DEPRECATIONS */ - - /** - * @deprecated Use {@link #of(Material) of} instead. - */ - @Deprecated - public static FabricBlockSettings create(Material material) { - return of(material); - } - - /** - * @deprecated Use {@link #breakByHand(boolean) breakByHand} instead. - */ - @Deprecated - public FabricBlockSettings setBreakByHand(boolean value) { - return this.breakByHand(value); - } - - /** - * @deprecated Use {@link #breakByTool(Tag) breakByTool} instead. - */ - @Deprecated - public FabricBlockSettings setBreakByTool(Tag tag) { - return this.breakByTool(tag); - } - - /** - * @deprecated Use {@link #breakByTool(Tag, int) breakByTool} instead. - */ - @Deprecated - public FabricBlockSettings setBreakByTool(Tag tag, int miningLevel) { - return this.breakByTool(tag, miningLevel); - } - - /** - * @deprecated Use {@link #setMaterialColor(MaterialColor) setMaterialColor} instead. - */ - @Deprecated - public FabricBlockSettings setMapColor(MaterialColor color) { - return this.materialColor(color); - } - - /** - * @deprecated Use {@link #setMaterialColor(DyeColor) setMaterialColor} instead. - */ - @Deprecated - public FabricBlockSettings setMapColor(DyeColor color) { - return this.materialColor(color); - } - - /** - * @deprecated Use {@link #materialColor(DyeColor) materialColor} instead. - */ - @Deprecated - public FabricBlockSettings setMaterialColor(MaterialColor color) { - return this.materialColor(color); - } - - /** - * @deprecated Use {@link #materialColor(DyeColor) materialColor} instead. - */ - @Deprecated - public FabricBlockSettings setMaterialColor(DyeColor color) { - return this.materialColor(color); - } - - /** - * @deprecated Use {@link #collidable(boolean) collidable} instead. - */ - @Deprecated - public FabricBlockSettings setCollidable(boolean value) { - castDelegate.fabric_setCollidable(value); - return this; - } - - /** - * @deprecated Use {@link #sounds(BlockSoundGroup) sounds} instead. - */ - @Deprecated - public FabricBlockSettings setSoundGroup(BlockSoundGroup group) { - return this.sounds(group); - } - - /** - * @deprecated Use {@link #ticksRandomly() ticksRandomly} instead. - */ - @Deprecated - public FabricBlockSettings acceptRandomTicks() { - return this.ticksRandomly(); - } - - /** - * @deprecated Use {@link #lightLevel(int) lightLevel} instead. - */ - @Deprecated - public FabricBlockSettings setLuminance(int value) { - return this.lightLevel(value); - } - - /** - * @deprecated Use {@link #hardness(float) hardness} instead. - */ - @Deprecated - public FabricBlockSettings setHardness(float value) { - return this.hardness(value); - } - - /** - * @deprecated Use {@link #resistance(float) resistance} instead. - */ - @Deprecated - public FabricBlockSettings setResistance(float value) { - return this.resistance(value); - } - - /** - * @deprecated Use {@link #strength(float, float) strength} instead. - */ - @Deprecated - public FabricBlockSettings setStrength(float hardness, float resistance) { - return this.strength(hardness, resistance); - } - - /** - * @deprecated Use {@link #dropsNothing() dropsNothing} instead. - */ - @Deprecated - public FabricBlockSettings noDropTable() { - return this.dropsNothing(); - } - - /** - * @deprecated Use {@link #dropsLike(Block) dropsLike} instead. - */ - @Deprecated - public FabricBlockSettings copyDropTable(Block block) { - return this.dropsLike(block); - } - - /** - * @deprecated Use {@link #drops(Identifier) drops} instead. - */ - @Deprecated - public FabricBlockSettings setDropTable(Identifier id) { - return this.drops(id); - } - - /** - * @deprecated Use {@link #friction(float) friction} instead. - */ - @Deprecated - public FabricBlockSettings setFrictionCoefficient(float value) { - return this.friction(value); - } } diff --git a/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java b/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java index 0e36cf2cc..07e02492e 100644 --- a/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java @@ -64,11 +64,6 @@ public class EntityTrackingRegistry { return entries.get(type); } - @Deprecated - public Packet createSpawnPacket(Entity entity) { - return null; - } - public void register(EntityType type, int trackingDistance, int updateIntervalTicks) { register(type, trackingDistance, updateIntervalTicks, true); } @@ -76,9 +71,4 @@ public class EntityTrackingRegistry { public void register(EntityType type, int trackingDistance, int updateIntervalTicks, boolean alwaysUpdateVelocity) { entries.put(type, new Entry(trackingDistance, updateIntervalTicks, alwaysUpdateVelocity)); } - - @Deprecated - public void registerSpawnPacketProvider(EntityType type, Function packetFunction) { - LOGGER.warn("[EntityTrackingRegistry] As of 19w05a, registerSpawnPacketProvider is a no-op! Update your mod!"); - } } diff --git a/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java b/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java index baa9c504d..9228cc78d 100644 --- a/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java +++ b/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java @@ -37,29 +37,11 @@ public class FabricEntityTypeBuilder { private boolean alwaysUpdateVelocity = true; private float width = -1.0f, height = -1.0f; - @Deprecated - protected FabricEntityTypeBuilder(Class entityClass, Function function) { - LOGGER.warn("[FabricEntityTypeBuilder] Please specify EntityCategory for " + entityClass.getName() + "!"); - this.category = EntityCategory.MISC; - this.function = function; - } - protected FabricEntityTypeBuilder(EntityCategory category, Function function) { this.category = category; this.function = function; } - @Deprecated - public static FabricEntityTypeBuilder create(Class entityClass) { - return new FabricEntityTypeBuilder<>(entityClass, (w) -> null); - } - - @Deprecated - public static FabricEntityTypeBuilder create(Class entityClass, Function function) { - LOGGER.warn("[FabricEntityTypeBuilder] Please specify EntityCategory for " + entityClass.getName() + "!"); - return new FabricEntityTypeBuilder<>(entityClass, function); - } - public static FabricEntityTypeBuilder create(EntityCategory category) { return new FabricEntityTypeBuilder<>(category, (w) -> null); } @@ -95,11 +77,6 @@ public class FabricEntityTypeBuilder { return this; } - @Deprecated - public EntityType build(String id) { - return build(); - } - public EntityType build() { if (this.saveable) { // SNIP! Modded datafixers are not supported anyway.