mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Removed Deprecated API
This commit is contained in:
@@ -20,11 +20,4 @@
|
||||
package dev.architectury.registry.block;
|
||||
|
||||
public interface BlockPropertiesExtension {
|
||||
@Deprecated
|
||||
default BlockProperties tool(ToolType type) {
|
||||
return tool(type, 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
BlockProperties tool(ToolType type, int level);
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -34,12 +33,6 @@ public final class EntityRendererRegistry {
|
||||
private EntityRendererRegistry() {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
public static <T extends Entity> void register(EntityType<? extends T> type, EntityRendererProvider<T> provider) {
|
||||
register(() -> type, provider);
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static <T extends Entity> void register(Supplier<EntityType<? extends T>> type, EntityRendererProvider<T> provider) {
|
||||
throw new AssertionError();
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
package dev.architectury.registry.block.fabric;
|
||||
|
||||
import dev.architectury.registry.block.BlockProperties;
|
||||
import dev.architectury.registry.block.ToolType;
|
||||
import net.fabricmc.fabric.impl.object.builder.BlockSettingsInternals;
|
||||
import net.fabricmc.fabric.impl.object.builder.FabricBlockInternals;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
@@ -71,11 +69,5 @@ public class BlockPropertiesImpl {
|
||||
public Impl(Material material, Function<BlockState, MaterialColor> function) {
|
||||
super(material, function);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockProperties tool(ToolType type, int level) {
|
||||
FabricBlockInternals.computeExtraData(this).addMiningLevel(type.fabricTag.get(), level);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,11 +64,5 @@ public class BlockPropertiesImpl {
|
||||
public Impl(Material material, Function<BlockState, MaterialColor> function) {
|
||||
super(material, function);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public BlockProperties tool(ToolType type, int level) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class TestMod {
|
||||
public static void initializeClient() {
|
||||
TestKeybinds.initialize();
|
||||
TestModNet.initializeClient();
|
||||
EntityRendererRegistry.register(TestEntity.TYPE, context ->
|
||||
EntityRendererRegistry.register(() -> TestEntity.TYPE, context ->
|
||||
new MinecartRenderer<>(context, ModelLayers.MINECART));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user