From 94c59ae5f852e6f135fb7f03c154bd16c097b947 Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 21 Nov 2016 16:51:05 +0100 Subject: [PATCH] Not needed i guess. --- src/main/java/gregtech/api/GregTech_API.java | 5 +-- .../basic/GT_MetaTileEntity_Teleporter.java | 40 +------------------ .../preload/GT_Loader_MetaTileEntities.java | 2 +- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 813d1ed9..9db617ef 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -205,9 +205,8 @@ public class GregTech_API { sItemStackMappings.add(sCovers); sItemStackMappings.add(sCoverBehaviors); - //sDimensionalList.add(-1); - //sDimensionalList.add(0); - //sDimensionalList.add(1); + //sDimensionalList.add(56); + //sDimensionalList.add(55); sSoundList.put(0, "random.break"); sSoundList.put(1, "random.anvil_use"); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 671ddeb0..e8b7f90e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -50,7 +50,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public int mTargetZ = 0; public int mTargetD = 0; public boolean mDebug = false; - public boolean hasBlock = false; public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 3, "Teleport long distances with this little device."); @@ -65,8 +64,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { if ((aEntity instanceof EntityFX)) { return -1.0F; } - } catch (Throwable e) { - } + } catch (Throwable e) {} if ((aEntity instanceof EntityFishHook)) { return -1.0F; } @@ -142,7 +140,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - this.hasBlock = checkForBlock(); aBaseMetaTileEntity.openGUI(aPlayer); return true; } @@ -216,29 +213,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { this.mTargetZ = aBaseMetaTileEntity.getZCoord(); this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; } - this.hasBlock = checkForBlock(); } } - public boolean checkForBlock() { - for (byte i = -5; i <= 5; i = (byte) (i + 1)) { - for (byte j = -5; j <= 5; j = (byte) (j + 1)) { - for (byte k = -5; k <= 5; k = (byte) (k + 1)) { - if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == GregTech_API.sBlockMetal5 && getBaseMetaTileEntity().getMetaIDOffset(i, j, k) == 2){ - return true; - } - } - } - } - return false; - } - - public boolean hasDimensionalTeleportCapability() { - return (this.mDebug) || (this.hasBlock) || (mFluid.isFluidEqual(Materials.Iron.getPlasma(1)) && mFluid.amount >= 1000); - } - public boolean isDimensionalTeleportAvailable() { - return (this.mDebug) || ((hasDimensionalTeleportCapability()) && (GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId))); + return (this.mDebug) || ((GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId))); } @Override @@ -248,17 +227,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } super.onPostTick(aBaseMetaTileEntity, aTick); if (getBaseMetaTileEntity().isServerSide()) { - if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { - this.hasBlock = checkForBlock(); - } if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) { if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048, false)) { - if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasBlock || mFluid.isFluidEqual(Materials.Iron.getPlasma(1)))&& new XSTR().nextInt(10)==0) { - mFluid.amount--; - if (mFluid.amount < 1) { - mFluid = null; - } - } int tDistance = distanceCalculation(); if (mInventory[0] != null) { TileEntity tTile = null; @@ -284,12 +254,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { Entity tEntity = (Entity) tObject; //System.out.println("teleport"+(Math.pow(tDistance, 1.5))); if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) Math.pow(tDistance, 1.5) * (long)weightCalculation(tEntity), false)) { - if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasBlock || mFluid.isFluidEqual(Materials.Iron.getPlasma(1)))) { - mFluid.amount = mFluid.amount - GT_Utility.safeInt((long)Math.min(1000L, (long)Math.pow(tDistance, 1.5) * weightCalculation(tEntity) / 8192)); - if (mFluid.amount < 1) { - mFluid = null; - } - } if (tEntity.ridingEntity != null) { tEntity.mountEntity(null); } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 5b95a355..a3648364 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1164,7 +1164,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { // GT_ModHandler.addCraftingRecipe(ItemList.Pump_ZPM.get(1L, new Object[0]), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_ZPM, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master), 'P', ItemList.Electric_Pump_ZPM}); // GT_ModHandler.addCraftingRecipe(ItemList.Pump_UV.get(1L, new Object[0]), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_UV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'P', ItemList.Electric_Pump_UV}); - ItemList.Teleporter.set(new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter", 6).getStackForm(1L)); + ItemList.Teleporter.set(new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter", 9).getStackForm(1L)); ItemList.MobRep_LV.set(new GT_MetaTileEntity_MonsterRepellent(1146, "basicmachine.mobrep.tier.01", "Basic Monster Repellator", 1).getStackForm(1L)); ItemList.MobRep_MV.set(new GT_MetaTileEntity_MonsterRepellent(1147, "basicmachine.mobrep.tier.02", "Advanced Monster Repellator", 2).getStackForm(1L));