Replaced some Method calls

This commit is contained in:
canitzp 2016-02-19 19:58:26 +01:00
parent 51de083209
commit 967d180cca
7 changed files with 7 additions and 8 deletions

View file

@ -54,7 +54,7 @@ public class BlockCoalGenerator extends BlockContainerBase{
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){
int meta = PosUtil.getMetadata(pos, world);
int meta = state.getBlock().getMetaFromState(state);
if(meta == 1){
for(int i = 0; i < 5; i++){

View file

@ -68,7 +68,7 @@ public class BlockColoredLamp extends BlockBase{
//Turning On
if(player.isSneaking()){
if(!world.isRemote){
PosUtil.setBlock(pos, world, this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn, PosUtil.getMetadata(pos, world), 2);
PosUtil.setBlock(pos, world, this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn, state.getBlock().getMetaFromState(state), 2);
}
return true;
}
@ -82,7 +82,7 @@ public class BlockColoredLamp extends BlockBase{
String name = OreDictionary.getOreName(oreID);
TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name);
if(color != null){
if(PosUtil.getMetadata(pos, world) != color.ordinal()){
if(state.getBlock().getMetaFromState(state) != color.ordinal()){
if(!world.isRemote){
PosUtil.setMetadata(pos, world, color.ordinal(), 2);
if(!player.capabilities.isCreativeMode){

View file

@ -56,7 +56,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){
int meta = PosUtil.getMetadata(pos, world);
int meta = state.getBlock().getMetaFromState(state);
if(meta > 3){
float f = (float)pos.getX()+0.5F;

View file

@ -56,7 +56,7 @@ public class BlockGrinder extends BlockContainerBase{
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){
int meta = PosUtil.getMetadata(pos, world);
int meta = state.getBlock().getMetaFromState(state);
if(meta == 1){
for(int i = 0; i < 5; i++){

View file

@ -54,7 +54,7 @@ public class BlockOilGenerator extends BlockContainerBase{
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand){
if(PosUtil.getMetadata(pos, world) == 1){
if(state.getBlock().getMetaFromState(state) == 1){
for(int i = 0; i < 5; i++){
world.spawnParticle(ClientProxy.bulletForMyValentine ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX()+0.5F, (double)pos.getY()+1.0F, (double)pos.getZ()+0.5F, 0.0D, 0.0D, 0.0D);
}

View file

@ -51,7 +51,7 @@ public class BlockWildPlant extends BlockBushBase{
@Override
public boolean canBlockStay(World world, BlockPos pos, IBlockState state){
BlockPos offset = PosUtil.offset(pos, 0, -1, 0);
return PosUtil.getMetadata(pos, world) == TheWildPlants.RICE.ordinal() ? PosUtil.getMaterial(offset, world) == Material.water : PosUtil.getBlock(offset, world).canSustainPlant(world, offset, EnumFacing.UP, this);
return state.getBlock().getMetaFromState(state) == TheWildPlants.RICE.ordinal() ? PosUtil.getMaterial(offset, world) == Material.water : PosUtil.getBlock(offset, world).canSustainPlant(world, offset, EnumFacing.UP, this);
}
@Override

View file

@ -20,7 +20,6 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
//TODO Fix Reconstructor Lens rendering
public class RenderReconstructorLens extends TileEntitySpecialRenderer{
@Override