mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Replaced some Method calls
This commit is contained in:
parent
51de083209
commit
967d180cca
7 changed files with 7 additions and 8 deletions
|
@ -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++){
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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++){
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue