mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
oil pumps can now drill through block based on blast resistance
This commit is contained in:
parent
368c33ba17
commit
1bbeb591be
@ -279,11 +279,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
|||||||
if(b == ModBlocks.oil_pipe)
|
if(b == ModBlocks.oil_pipe)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(b == Blocks.air || b == Blocks.grass || b == Blocks.dirt ||
|
if(b.isReplaceable(worldObj, xCoord, i, zCoord) || b.getExplosionResistance(null) < 100) {
|
||||||
b == Blocks.stone || b == Blocks.sand || b == Blocks.sandstone ||
|
|
||||||
b == Blocks.clay || b == Blocks.hardened_clay || b == Blocks.stained_hardened_clay ||
|
|
||||||
b == Blocks.gravel || isOre(b, worldObj.getBlockMetadata(xCoord, i, zCoord)) ||
|
|
||||||
b.isReplaceable(worldObj, xCoord, i, zCoord)) {
|
|
||||||
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
||||||
|
|
||||||
//Code 2: The drilling ended
|
//Code 2: The drilling ended
|
||||||
@ -345,21 +341,6 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOre(Block b, int meta) {
|
|
||||||
|
|
||||||
int[] ids = OreDictionary.getOreIDs(new ItemStack(b, 1, meta));
|
|
||||||
|
|
||||||
for(int i = 0; i < ids.length; i++) {
|
|
||||||
|
|
||||||
String s = OreDictionary.getOreName(ids[i]);
|
|
||||||
|
|
||||||
if(s.length() > 3 && s.substring(0, 3).equals("ore"))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean succ(int x, int y, int z) {
|
public boolean succ(int x, int y, int z) {
|
||||||
|
|
||||||
list.clear();
|
list.clear();
|
||||||
|
|||||||
@ -282,11 +282,7 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
|||||||
if(b == ModBlocks.oil_pipe)
|
if(b == ModBlocks.oil_pipe)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(b == Blocks.air || b == Blocks.grass || b == Blocks.dirt ||
|
if(b.isReplaceable(worldObj, xCoord, i, zCoord) || b.getExplosionResistance(null) < 100) {
|
||||||
b == Blocks.stone || b == Blocks.sand || b == Blocks.sandstone ||
|
|
||||||
b == Blocks.clay || b == Blocks.hardened_clay || b == Blocks.stained_hardened_clay ||
|
|
||||||
b == Blocks.gravel || isOre(b, worldObj.getBlockMetadata(xCoord, i, zCoord)) ||
|
|
||||||
b.isReplaceable(worldObj, xCoord, i, zCoord)) {
|
|
||||||
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
||||||
|
|
||||||
//Code 2: The drilling ended
|
//Code 2: The drilling ended
|
||||||
@ -350,21 +346,6 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOre(Block b, int meta) {
|
|
||||||
|
|
||||||
int[] ids = OreDictionary.getOreIDs(new ItemStack(b, 1, meta));
|
|
||||||
|
|
||||||
for(int i = 0; i < ids.length; i++) {
|
|
||||||
|
|
||||||
String s = OreDictionary.getOreName(ids[i]);
|
|
||||||
|
|
||||||
if(s.length() > 3 && s.substring(0, 3).equals("ore"))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean succ(int x, int y, int z) {
|
public boolean succ(int x, int y, int z) {
|
||||||
|
|
||||||
list.clear();
|
list.clear();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user