More deprecation removal

This commit is contained in:
Matthew Miller
2018-06-16 16:36:55 +10:00
parent 20bf6e079b
commit aaaf2d5678
152 changed files with 701 additions and 1150 deletions

View File

@ -81,26 +81,11 @@ public class ForgePlayer extends AbstractPlayerActor {
this.player.rotationPitch);
}
@Override
public Location getPosition() {
return new Location(ForgeWorldEdit.inst.getWorld(this.player.world), this.player.posX, this.player.posY, this.player.posZ);
}
@Override
public com.sk89q.worldedit.world.World getWorld() {
return ForgeWorldEdit.inst.getWorld(this.player.world);
}
@Override
public double getPitch() {
return this.player.rotationPitch;
}
@Override
public double getYaw() {
return this.player.rotationYaw;
}
@Override
public void giveItem(int type, int amt) {
this.player.inventory.addItemStackToInventory(new ItemStack(Item.getItemById(type), amt, 0));

View File

@ -167,8 +167,7 @@ public class ForgeWorld extends AbstractWorld {
Chunk chunk = world.getChunkFromChunkCoords(x >> 4, z >> 4);
BlockPos pos = new BlockPos(x, y, z);
IBlockState old = chunk.getBlockState(pos);
@SuppressWarnings("deprecation")
IBlockState newState = Block.getBlockById(block.getId()).getStateFromMeta(block.getData());
IBlockState newState = Block.getBlockById(block.getId()).getStateFromMeta(block.getData());
IBlockState successState = chunk.setBlockState(pos, newState);
boolean successful = successState != null;