Most of the 1.8 Port.
This commit is contained in:
@@ -26,16 +26,17 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.MaterialLiquid;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderBlockPaint;
|
||||
@@ -58,6 +59,12 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<? extends BaseBlockRender> getRenderer()
|
||||
{
|
||||
@@ -70,23 +77,32 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool( World world, int x, int y, int z )
|
||||
public AxisAlignedBB getCollisionBoundingBox(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCollideCheck( int metadata, boolean isHoldingRightClick )
|
||||
public boolean canCollideCheck(
|
||||
IBlockState state,
|
||||
boolean hitIfLiquid )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( World w, int x, int y, int z, Block junk )
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
{
|
||||
TilePaint tp = this.getTileEntity( w, x, y, z );
|
||||
TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
@@ -95,30 +111,42 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped( int meta, Random random, int fortune )
|
||||
public Item getItemDropped(
|
||||
IBlockState state,
|
||||
Random rand,
|
||||
int fortune )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance( World world, int x, int y, int z, int meta, float chance, int fortune )
|
||||
public void dropBlockAsItemWithChance(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
float chance,
|
||||
int fortune )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void fillWithRain( World w, int x, int y, int z )
|
||||
public void fillWithRain(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
|
||||
w.setBlockToAir( pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getLightValue( IBlockAccess w, int x, int y, int z )
|
||||
public int getLightValue(
|
||||
IBlockAccess w,
|
||||
BlockPos pos )
|
||||
{
|
||||
TilePaint tp = this.getTileEntity( w, x, y, z );
|
||||
TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
@@ -129,14 +157,19 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable( IBlockAccess world, int x, int y, int z )
|
||||
public boolean isAir(
|
||||
IBlockAccess world,
|
||||
BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isAir( IBlockAccess world, int x, int y, int z )
|
||||
public boolean isReplaceable(
|
||||
World worldIn,
|
||||
BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user