fix teleporter and improve seismic prospector

This commit is contained in:
Blood-Asp 2015-12-13 18:07:59 +01:00
parent 2bf2ecc35e
commit 8f3c48ed11
2 changed files with 6 additions and 4 deletions

View file

@ -57,12 +57,13 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
GT_Utility.ItemNBT.setBookTitle(aPlayer.getCurrentEquippedItem(), "Raw Prospection Data");
List<String> tStringList = new ArrayList<String>();
for (int i = this.getBaseMetaTileEntity().getYCoord(); i > 0; i--) {
for (int f = -1; f < 2; f++) {
for (int g = -1; g < 2; g++) {
for (int f = -2; f < 3; f++) {
for (int g = -2; g < 3; g++) {
Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g);
if ((tBlock instanceof GT_Block_Ores)) {
TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
if(((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000){
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
if (!tStringList.contains(tMaterial.mDefaultLocalName)) {
@ -70,6 +71,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}
}
}
}
} else {
int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g);
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));

View file

@ -238,7 +238,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
}
if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) {
if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048, false)) {
if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) {
if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) {
mFluid.amount--;
if (mFluid.amount < 1) {
mFluid = null;
@ -268,7 +268,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) {
Entity tEntity = (Entity) tObject;
if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (tDistance * tDistance * weightCalculation(tEntity)), false)) {
if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) {
if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) {
mFluid.amount = mFluid.amount - ((int) Math.min(1000, (tDistance * tDistance * weightCalculation(tEntity) / 8192)));
if (mFluid.amount < 1) {
mFluid = null;