changed onBlockPlaced to updateBlockMetadata
This commit is contained in:
parent
47dcb242f9
commit
d4397d4894
4 changed files with 27 additions and 25 deletions
|
@ -163,30 +163,30 @@ public class BlockMarker extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlaced(World world, int i, int j, int k, int l) {
|
public void updateBlockMetadata(World world, int x, int y, int z, int par5, float par6, float par7, float par8) {
|
||||||
super.onBlockPlaced(world, i, j, k, l);
|
super.updateBlockMetadata(world, x, y, z, par5, par6, par7, par8);
|
||||||
int i1 = world.getBlockMetadata(i, j, k);
|
int i1 = world.getBlockMetadata(x, y, z);
|
||||||
if (l == 1 && BuildersProxy.canPlaceTorch(world, i, j - 1, k)) {
|
if (par5 == 1 && BuildersProxy.canPlaceTorch(world, x, y - 1, z)) {
|
||||||
i1 = 5;
|
i1 = 5;
|
||||||
}
|
}
|
||||||
if (l == 2 && BuildersProxy.canPlaceTorch(world, i, j, k + 1)) {
|
if (par5 == 2 && BuildersProxy.canPlaceTorch(world, x, y, z + 1)) {
|
||||||
i1 = 4;
|
i1 = 4;
|
||||||
}
|
}
|
||||||
if (l == 3 && BuildersProxy.canPlaceTorch(world, i, j, k - 1)) {
|
if (par5 == 3 && BuildersProxy.canPlaceTorch(world, x, y, z - 1)) {
|
||||||
i1 = 3;
|
i1 = 3;
|
||||||
}
|
}
|
||||||
if (l == 4 && BuildersProxy.canPlaceTorch(world, i + 1, j, k)) {
|
if (par5 == 4 && BuildersProxy.canPlaceTorch(world, x + 1, y, z)) {
|
||||||
i1 = 2;
|
i1 = 2;
|
||||||
}
|
}
|
||||||
if (l == 5 && BuildersProxy.canPlaceTorch(world, i - 1, j, k)) {
|
if (par5 == 5 && BuildersProxy.canPlaceTorch(world, x - 1, y, z)) {
|
||||||
i1 = 1;
|
i1 = 1;
|
||||||
}
|
}
|
||||||
if (l == 0 && BuildersProxy.canPlaceTorch(world, i, j + 1, k)) {
|
if (par5 == 0 && BuildersProxy.canPlaceTorch(world, x, y + 1, z)) {
|
||||||
i1 = 0;
|
i1 = 0;
|
||||||
}
|
}
|
||||||
world.setBlockMetadataWithNotify(i, j, k, i1);
|
world.setBlockMetadataWithNotify(x, y, z, i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockAdded(World world, int i, int j, int k) {
|
public void onBlockAdded(World world, int i, int j, int k) {
|
||||||
super.onBlockAdded(world, i, j, k);
|
super.onBlockAdded(world, i, j, k);
|
||||||
|
|
|
@ -105,10 +105,10 @@ public class BlockEngine extends BlockContainer {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlaced(World world, int i, int j, int k, int l) {
|
public void updateBlockMetadata(World world, int x, int y, int z, int par5, float par6, float par7, float par8) {
|
||||||
TileEngine tile = (TileEngine) world.getBlockTileEntity(i, j, k);
|
TileEngine tile = (TileEngine) world.getBlockTileEntity(x, y, z);
|
||||||
tile.orientation = Orientations.YPos.ordinal();
|
tile.orientation = Orientations.YPos.ordinal();
|
||||||
tile.switchOrientation();
|
tile.switchOrientation();
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,16 +70,17 @@ public class BlockLaser extends BlockContainer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlaced(World world, int i, int j, int k, int l) {
|
public void updateBlockMetadata(World world, int x, int y, int z, int par5, float par6, float par7, float par8) {
|
||||||
super.onBlockPlaced(world, i, j, k, l);
|
super.updateBlockMetadata(world, x, y, z, par5, par6, par7, par8);
|
||||||
int i1 = world.getBlockMetadata(i, j, k);
|
int i1 = world.getBlockMetadata(x, y, z);
|
||||||
if (l <= 6) {
|
if (par5 <= 6) {
|
||||||
i1 = l;
|
i1 = par5;
|
||||||
}
|
}
|
||||||
world.setBlockMetadataWithNotify(i, j, k, i1);
|
world.setBlockMetadataWithNotify(x, y, z, i1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
@Override
|
@Override
|
||||||
public void addCreativeItems(ArrayList itemList) {
|
public void addCreativeItems(ArrayList itemList) {
|
||||||
|
|
|
@ -258,14 +258,15 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
pipe.container.scheduleNeighborChange();
|
pipe.container.scheduleNeighborChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockPlaced(World world, int i, int j, int k, int l) {
|
|
||||||
super.onBlockPlaced(world, i, j, k, l);
|
|
||||||
|
|
||||||
Pipe pipe = getPipe(world, i, j, k);
|
@Override
|
||||||
|
public void updateBlockMetadata(World world, int x, int y, int z, int par5, float par6, float par7, float par8) {
|
||||||
|
super.updateBlockMetadata(world, x, y, z, par5, par6, par7, par8);
|
||||||
|
Pipe pipe = getPipe(world, x, y, z);
|
||||||
|
|
||||||
if (isValid(pipe))
|
if (isValid(pipe))
|
||||||
pipe.onBlockPlaced();
|
pipe.onBlockPlaced();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue