Updated for 1.7.2
This commit is contained in:
parent
cc178e1a3b
commit
29228e18fe
105 changed files with 1939 additions and 2690 deletions
|
|
@ -8,23 +8,27 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPlatform extends Block {
|
||||
public BlockPlatform(int id) {
|
||||
super(id, Material.rock);
|
||||
this.setBlockUnbreakable();
|
||||
this.setResistance(6000000.0F);
|
||||
this.setTickRandomly(true);
|
||||
public BlockPlatform() {
|
||||
super(Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
setTickRandomly(true);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F);
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
|
||||
int block = BlockHandler.pillar.blockID;
|
||||
double posX = x;
|
||||
double posY = y;
|
||||
double posZ = z;
|
||||
|
|
@ -39,11 +43,6 @@ public class BlockPlatform extends Block {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World par1World) {
|
||||
return 30;
|
||||
|
|
@ -54,12 +53,12 @@ public class BlockPlatform extends Block {
|
|||
}
|
||||
|
||||
private boolean isTowersNearby(World world, int x, int y, int z) {
|
||||
int pillar = BlockHandler.pillar.blockID;
|
||||
int insert = BlockHandler.pillarInsert.blockID;
|
||||
if (world.getBlockId(x - 2, y, z - 2) == pillar && world.getBlockId(x - 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z - 2) == pillar
|
||||
&& world.getBlockId(x - 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 1, z + 2) == insert && world.getBlockId(x + 2, y + 1, z + 2) == insert
|
||||
&& world.getBlockId(x + 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 2, z - 2) == pillar && world.getBlockId(x - 2, y + 2, z + 2) == pillar
|
||||
&& world.getBlockId(x + 2, y + 2, z + 2) == pillar && world.getBlockId(x + 2, y + 2, z - 2) == pillar) {
|
||||
Block pillar = BlockHandler.pillar;
|
||||
Block insert = BlockHandler.pillarInsert;
|
||||
if (world.getBlock(x - 2, y, z - 2) == pillar && world.getBlock(x - 2, y, z + 2) == pillar && world.getBlock(x + 2, y, z + 2) == pillar && world.getBlock(x + 2, y, z - 2) == pillar
|
||||
&& world.getBlock(x - 2, y + 1, z - 2) == insert && world.getBlock(x - 2, y + 1, z + 2) == insert && world.getBlock(x + 2, y + 1, z + 2) == insert
|
||||
&& world.getBlock(x + 2, y + 1, z - 2) == insert && world.getBlock(x - 2, y + 2, z - 2) == pillar && world.getBlock(x - 2, y + 2, z + 2) == pillar
|
||||
&& world.getBlock(x + 2, y + 2, z + 2) == pillar && world.getBlock(x + 2, y + 2, z - 2) == pillar) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue