Reduce Marble/Basalt harvest level and setOreBlock fixes
This commit is contained in:
parent
0e60389c41
commit
769362d60b
2 changed files with 34 additions and 38 deletions
|
@ -48,7 +48,7 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract {
|
|||
}
|
||||
|
||||
public int getHarvestLevel(int aMeta) {
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
|
||||
|
|
|
@ -46,43 +46,13 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
|
|||
aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
|
||||
}
|
||||
Block tBlock = aWorld.getBlock(aX, aY, aZ);
|
||||
Block tOreBlock = GregTech_API.sBlockOres1;
|
||||
Block tOreBlock = null;
|
||||
int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ);
|
||||
String BlockName = tBlock.getUnlocalizedName();
|
||||
aMetaData += isSmallOre ? 16000 : 0;
|
||||
if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) {
|
||||
if (BlockName.equals("tile.igneousStone")) {
|
||||
if (GregTech_API.sBlockOresUb1 != null) {
|
||||
tOreBlock = GregTech_API.sBlockOresUb1;
|
||||
aMetaData += (BlockMeta * 1000);
|
||||
//System.out.println("Block changed to UB1");
|
||||
}
|
||||
} else if (BlockName.equals("tile.metamorphicStone")) {
|
||||
if (GregTech_API.sBlockOresUb2 != null) {
|
||||
tOreBlock = GregTech_API.sBlockOresUb2;
|
||||
aMetaData += (BlockMeta * 1000);
|
||||
//System.out.println("Block changed to UB2");
|
||||
}
|
||||
} else if (BlockName.equals("tile.sedimentaryStone")) {
|
||||
if (GregTech_API.sBlockOresUb3 != null) {
|
||||
tOreBlock = GregTech_API.sBlockOresUb3;
|
||||
aMetaData += (BlockMeta * 1000);
|
||||
//System.out.println("Block changed to UB3");
|
||||
}
|
||||
} else if (BlockName.equals("tile.moonBlock") && (BlockMeta == 3 || BlockMeta == 4)) {
|
||||
if (GregTech_API.sBlockOresGC != null) {
|
||||
switch (BlockMeta) {
|
||||
case 3: tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
case 4: aMetaData += 1000; tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
}
|
||||
}
|
||||
} else if (BlockName.equals("tile.mars") && (BlockMeta == 6 || BlockMeta == 9)) {
|
||||
if (GregTech_API.sBlockOresGC != null) {
|
||||
switch (BlockMeta) {
|
||||
case 6: aMetaData += 2000; tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
case 9: aMetaData += 3000; tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
}
|
||||
}
|
||||
if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
|
||||
tOreBlock = GregTech_API.sBlockOres1;
|
||||
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) {
|
||||
aMetaData += 1000;
|
||||
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {
|
||||
|
@ -107,10 +77,36 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
|
|||
} else {
|
||||
aMetaData += 5000;
|
||||
}
|
||||
} else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
|
||||
return false;
|
||||
}
|
||||
System.out.println(tOreBlock);
|
||||
} else if (BlockName.equals("tile.igneousStone")) {
|
||||
if (GregTech_API.sBlockOresUb1 != null) {
|
||||
tOreBlock = GregTech_API.sBlockOresUb1;
|
||||
aMetaData += (BlockMeta * 1000);
|
||||
}
|
||||
} else if (BlockName.equals("tile.metamorphicStone")) {
|
||||
if (GregTech_API.sBlockOresUb2 != null) {
|
||||
tOreBlock = GregTech_API.sBlockOresUb2;
|
||||
aMetaData += (BlockMeta * 1000);
|
||||
}
|
||||
} else if (BlockName.equals("tile.sedimentaryStone")) {
|
||||
if (GregTech_API.sBlockOresUb3 != null) {
|
||||
tOreBlock = GregTech_API.sBlockOresUb3;
|
||||
aMetaData += (BlockMeta * 1000);
|
||||
}
|
||||
} else if (BlockName.equals("tile.moonBlock") && (BlockMeta == 3 || BlockMeta == 4)) {
|
||||
if (GregTech_API.sBlockOresGC != null) {
|
||||
switch (BlockMeta) {
|
||||
case 3: tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
case 4: aMetaData += 1000; tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
}
|
||||
}
|
||||
} else if (BlockName.equals("tile.mars") && (BlockMeta == 6 || BlockMeta == 9)) {
|
||||
if (GregTech_API.sBlockOresGC != null) {
|
||||
switch (BlockMeta) {
|
||||
case 6: aMetaData += 2000; tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
case 9: aMetaData += 3000; tOreBlock = GregTech_API.sBlockOresGC; break;
|
||||
}
|
||||
}
|
||||
} else tOreBlock = GregTech_API.sBlockOres1;
|
||||
aWorld.setBlock(aX, aY, aZ, tOreBlock, getHarvestData((short) aMetaData), 0);
|
||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||
|
|
Loading…
Reference in a new issue