Addess some deprecation warnings

This commit is contained in:
glowredman authored and Martin Robertz committed 2023-12-29 13:26:43 +01:00
1 parent 331c8a8c7b
commit 646988aae8
6 files changed
+6 -1

No files matched your search

@@ -168,6 +168,7 @@ public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProv
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
@SuppressWarnings("deprecation")
ItemStack itemStack = super.getPickBlock(target, world, x, y, z);
TileLeaves leaves = getLeafTile(world, x, y, z);
NBTTagCompound leavesNBT = new NBTTagCompound();
@@ -61,6 +61,7 @@ public class BlockFruitPod extends BlockCocoa {
tile.onBlockTick();
}
@SuppressWarnings("deprecation")
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) {
if (!world.isRemote) {
@@ -35,6 +35,7 @@ public abstract class BlockForestry extends BlockContainer {
setCreativeTab(CreativeTabForestry.tabForestry);
}
@SuppressWarnings("deprecation")
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) {
TileEntity tile = world.getTileEntity(x, y, z);
@@ -75,7 +75,7 @@ public class DataInputStreamForestry extends DataInputStream {
public <T extends IStreamable> T readStreamable(Class<T> streamableClass) throws IOException {
if (readBoolean()) {
try {
T streamable = streamableClass.newInstance();
T streamable = streamableClass.getConstructor().newInstance();
streamable.readData(this);
return streamable;
} catch (ReflectiveOperationException e) {
@@ -71,6 +71,7 @@ public class BlockFarm extends BlockStructure {
}
}
@SuppressWarnings("deprecation")
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
ArrayList<ItemStack> drops = getDrops(world, x, y, z, 0, 0);
@@ -73,6 +73,7 @@ import forestry.core.recipes.RecipeUtil;
import forestry.core.tiles.MachineDefinition;
import forestry.factory.recipes.FabricatorRecipe;
@SuppressWarnings("deprecation")
@Plugin(
pluginID = "Arboriculture",
name = "Arboriculture",