aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2021-01-17 20:40:23 -0800
committerJason Mitchell <mitchej@gmail.com>2021-01-17 20:40:23 -0800
commitf3e87249e566a8c80a22d1a30dce632abba4033e (patch)
treeed808ebe174c6f68eb89b3060d714ae8d64c27b3 /src/main
parentdb1a9e4a7fc67a1650ca08e5d6cfd1921d354b5d (diff)
downloadGT5-Unofficial-f3e87249e566a8c80a22d1a30dce632abba4033e.tar.gz
GT5-Unofficial-f3e87249e566a8c80a22d1a30dce632abba4033e.tar.bz2
GT5-Unofficial-f3e87249e566a8c80a22d1a30dce632abba4033e.zip
More removal of commented out code, small formatting adjustments
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Concretes.java25
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Metal.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java31
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java21
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java11
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Crafting.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Drain.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Lens.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Screen.java3
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java19
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Vent.java3
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_Achievements.java65
29 files changed, 36 insertions, 211 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java
index 0c24227ad3..2641b9db44 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java
@@ -72,29 +72,4 @@ public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlo
aEntity.motionX *= tSpeed; aEntity.motionZ *= tSpeed;
}
}
-
- /**
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) {
- Block tBlock = aWorld.getBlock(aX, aY + 1, aZ);
- if (((aEntity instanceof EntityLivingBase)) && (!(tBlock instanceof IFluidBlock)) && (!(tBlock instanceof BlockLiquid)) && (aEntity.onGround) && (!aEntity.isInWater()) && (!aEntity.isWet())) {
- if (aEntity.isSneaking()) {
- aEntity.motionX *= 0.8999999761581421D;
- aEntity.motionZ *= 0.8999999761581421D;
- } else {
- if (aEntity.motionX < 6.0 && aEntity.motionZ < 6.0) {
- aEntity.motionX *= 1.100000023841858D;
- aEntity.motionZ *= 1.100000023841858D;
- }
- }
- }
- }
-
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
- Block tBlock = aWorld.getBlock(aX, aY + 1, aZ);
- if (((tBlock instanceof IFluidBlock)) || ((tBlock instanceof BlockLiquid))) {
- return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
- }
- return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 0.875D, aZ + 1);
- }
- **/
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java
index abcc92a795..1d0e4a2cd5 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java
@@ -15,13 +15,14 @@ public class GT_Block_Metal extends GT_Block_Storage {
public OrePrefixes mPrefix;
public IIconContainer[] mBlockIcons;
public boolean mHideBlocks;
+ public static boolean mNEIisLoaded = Loader.isModLoaded("NotEnoughItems");
public GT_Block_Metal(String aName, Materials[] aMats, OrePrefixes aPrefix, IIconContainer[] aBlockIcons) {
super(GT_Item_Storage.class, aName, Material.iron);
mMats = aMats;
mPrefix = aPrefix;
mBlockIcons = aBlockIcons;
- mHideBlocks = Loader.isModLoaded("NotEnoughItems");
+ mHideBlocks = mNEIisLoaded;
for (int i = 0; i < aMats.length; i++) {
if (aMats[i].mMetaItemSubID > 0 && aMats[i].mHasParentMod) {
@@ -29,7 +30,7 @@ public class GT_Block_Metal extends GT_Block_Storage {
GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i));
}
}
- if (aMats.length<16 && Loader.isModLoaded("NotEnoughItems")) {
+ if (aMats.length<16 && mNEIisLoaded) {
for (int i = aMats.length; i < 16; i++) codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i));
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
index ec31cb212c..6b3b0823fb 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -69,10 +69,6 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10));
ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11));
ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12));
- //GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteBlack)});
- //GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteRed)});
- //GT_ModHandler.addCraftingRecipe(ItemList.Block_IridiumTungstensteel.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hBP", 'P', OrePrefixes.plate.get(Materials.Iridium), 'B', ItemList.Block_TungstenSteelReinforced.get(1L, new Object[0])});
- //GT_OreDictUnificator.setItemData(ItemList.Block_IridiumTungstensteel.get(1, new Object[0]), new ItemData(new MaterialStack(Materials.Iridium, OrePrefixes.plate.mMaterialAmount), new MaterialStack(Materials.TungstenSteel, 2*OrePrefixes.plate.mMaterialAmount),new MaterialStack(Materials.Concrete, OrePrefixes.dust.mMaterialAmount)));
GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1, new Object[0])});
GT_ModHandler.addCraftingRecipe(ItemList.Block_Powderbarrel.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WSW","GGG","WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', new ItemStack(Items.gunpowder,1),'S',new ItemStack(Items.string,1)});
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java
index c9c31dae54..5297847e0a 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java
@@ -24,9 +24,7 @@ import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
-public class GT_Block_Stones_Abstract
- extends GT_Generic_Block
- implements IOreRecipeRegistrator {
+public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRecipeRegistrator {
public GT_Block_Stones_Abstract(Class<? extends ItemBlock> aItemClass, String aName) {
super(aItemClass, aName, Material.rock);
OrePrefixes.crafting.add(this);
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
index c07f1f7a3a..d1479987a0 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
@@ -17,8 +17,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_Arm
- extends GT_CoverBehavior {
+public class GT_Cover_Arm extends GT_CoverBehavior {
public final int mTickRate;
//msb converted, 2nd : direction (1=export)
//right 14 bits: internalSlot, next 14 bits adjSlot, 0 = all, slot = -1
@@ -390,33 +389,5 @@ public class GT_Cover_Arm
return !export;
return export;
}
-
-// getStackInSlot wasn't available client side..
-// private void updateInventorySlots() {
-// updateInventorySlot(intSlotIcon, internalSlotID, true);
-// updateInventorySlot(adjSlotIcon, adjacentSlotID, false);
-// }
-//
-// private void updateInventorySlot(GT_GuiFakeItemButton button, int slotID, boolean internal) {
-// if (slotID == SLOT_ID_ANY) {
-// button.setItem(null);
-// return;
-// }
-//
-// if (super.tile instanceof TileEntity && !super.tile.isDead()) {
-// TileEntity tile;
-// if (internal)
-// tile = (TileEntity) super.tile;
-// else
-// tile = super.tile.getTileEntityAtSide(side);
-//
-// if (tile instanceof IInventory && ((IInventory) tile).getSizeInventory() >= slotID) {
-// ItemStack item = ((IInventory) tile).getStackInSlot(slotID);
-// button.setItem(item);
-// return;
-// }
-// }
-// button.setItem(null);
-// }
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java b/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java
deleted file mode 100644
index 77647a43d8..0000000000
--- a/src/main/java/gregtech/common/covers/GT_Cover_Blastproof.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-
-public class GT_Cover_Blastproof
- extends GT_CoverBehavior {
- private final float mLevel;
-
- public GT_Cover_Blastproof(float aLevel) {
- this.mLevel = aLevel;
- }
-
- public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return this.mLevel;
- }
-
- public boolean isSimpleCover() {
- return true;
- }
-}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
index 9624b68464..487d457b39 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
@@ -13,8 +13,7 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_ControlsWork
- extends GT_CoverBehavior {
+public class GT_Cover_ControlsWork extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
if (aTileEntity instanceof IMachineProgress) {
if ((aInputRedstone > 0) == (aCoverVariable == 0) && aCoverVariable != 2)
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index 1e21f80ed0..1694822360 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -44,17 +44,6 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior {
moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks);
-// for(int i=0 ; i < this.mMaxStacks ; i++) {
-// // Costs energy but we don't have enough, bail
-// if ((costsEnergy && !aTileEntity.isUniversalEnergyStored(256L)))
-// break;
-//
-// moved = GT_Utility.moveOneItemStack(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
-//
-// if(moved == 0)
-// break;
-// }
-
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java
index adc84a0e94..d38ce2ea44 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java
@@ -7,8 +7,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.network.play.server.S2DPacketOpenWindow;
-public class GT_Cover_Crafting
- extends GT_CoverBehavior {
+public class GT_Cover_Crafting extends GT_CoverBehavior {
public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if ((aPlayer instanceof EntityPlayerMP)) {
((EntityPlayerMP) aPlayer).getNextWindowId();
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
index f2a37dd3cc..b75398a55a 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
@@ -14,8 +14,7 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_DoesWork
- extends GT_CoverBehavior {
+public class GT_Cover_DoesWork extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
if ((aTileEntity instanceof IMachineProgress)) {
if (aCoverVariable < 2) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
index e26d7bb4a2..0cf7305da6 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
@@ -14,8 +14,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.IFluidHandler;
-public class GT_Cover_Drain
- extends GT_CoverBehavior {
+public class GT_Cover_Drain extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
if ((aCoverVariable % 3 > 1) && ((aTileEntity instanceof IMachineProgress))) {
if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 3 < 2) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
index d12034d3a7..1e6b5512bb 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
@@ -19,8 +19,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_EUMeter
- extends GT_CoverBehavior {
+public class GT_Cover_EUMeter extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
long tScale = 0L;
if (aCoverVariable < 2) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
index f5eaca9a74..dea81e1bae 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
@@ -7,8 +7,7 @@ import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_EnergyOnly
- extends GT_CoverBehavior {
+public class GT_Cover_EnergyOnly extends GT_CoverBehavior {
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + 1) % 3;
switch(aCoverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
index 29c752ddf9..63966fe12c 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
@@ -17,8 +17,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_ItemMeter
- extends GT_CoverBehavior {
+public class GT_Cover_ItemMeter extends GT_CoverBehavior {
// format:
private static final int SLOT_MASK = 0x3FFFFFF; // 0 = all, 1 = 0 ...
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java
index 85f61e8b74..4758ebec3d 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java
@@ -3,8 +3,7 @@ package gregtech.common.covers;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.util.GT_CoverBehavior;
-public class GT_Cover_Lens
- extends GT_CoverBehavior {
+public class GT_Cover_Lens extends GT_CoverBehavior {
private final byte mColor;
public GT_Cover_Lens(byte aColor) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index 9ca2f77d62..a4bc9225db 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -16,8 +16,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
-public class GT_Cover_LiquidMeter
- extends GT_CoverBehavior {
+public class GT_Cover_LiquidMeter extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
if ((aTileEntity instanceof IFluidHandler)) {
FluidTankInfo[] tTanks = ((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN);
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index 3facde63a1..1c8b31b537 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -16,8 +16,7 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
-public class GT_Cover_Pump
- extends GT_CoverBehavior{
+public class GT_Cover_Pump extends GT_CoverBehavior{
public final int mTransferRate;
public GT_Cover_Pump(int aTransferRate) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java
index d942c944aa..36eaf83873 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java
@@ -6,8 +6,7 @@ import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_RedstoneConductor
- extends GT_CoverBehavior {
+public class GT_Cover_RedstoneConductor extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
if (aCoverVariable == 0) {
aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getStrongestRedstone());
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java
index d76cda3ede..51f6e7adb5 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java
@@ -3,8 +3,7 @@ package gregtech.common.covers;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.tileentity.ICoverable;
-public class GT_Cover_RedstoneReceiverExternal
- extends GT_Cover_RedstoneWirelessBase {
+public class GT_Cover_RedstoneReceiverExternal extends GT_Cover_RedstoneWirelessBase {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
aTileEntity.setOutputRedstoneSignal(aSide, GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue());
return aCoverVariable;
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java
index 84f0ba36f7..6637d31dbf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java
@@ -4,8 +4,7 @@ import gregtech.api.GregTech_API;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IMachineProgress;
-public class GT_Cover_RedstoneReceiverInternal
- extends GT_Cover_RedstoneWirelessBase {
+public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWirelessBase {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
if (aTileEntity instanceof IMachineProgress) {
if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) >0)
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java
index 114fd8b3dc..245bab1fdf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java
@@ -7,8 +7,7 @@ import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_RedstoneSignalizer
- extends GT_CoverBehavior {
+public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior {
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + 1) % 48;
switch(aCoverVariable / 16) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java
index d4a334e18e..be0437d930 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java
@@ -3,8 +3,7 @@ package gregtech.common.covers;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.tileentity.ICoverable;
-public class GT_Cover_RedstoneTransmitterExternal
- extends GT_Cover_RedstoneWirelessBase {
+public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirelessBase {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aInputRedstone));
return aCoverVariable;
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
index f632561994..3dab17409c 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
@@ -3,8 +3,7 @@ package gregtech.common.covers;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.tileentity.ICoverable;
-public class GT_Cover_RedstoneTransmitterInternal
- extends GT_Cover_RedstoneWirelessBase {
+public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirelessBase {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide)));
return aCoverVariable;
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
index 1407311b88..49126e24cb 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
@@ -12,8 +12,7 @@ import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public abstract class GT_Cover_RedstoneWirelessBase
- extends GT_CoverBehavior {
+public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior {
public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
return true;
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java
index 866102212c..00a09e71bf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java
@@ -5,8 +5,7 @@ import gregtech.api.util.GT_CoverBehavior;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_Screen
- extends GT_CoverBehavior {
+public class GT_Cover_Screen extends GT_CoverBehavior {
public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
return 20.0F;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
index b1c0c5c3af..360bcce6eb 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
@@ -13,8 +13,7 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
-public class GT_Cover_Shutter
- extends GT_CoverBehavior {
+public class GT_Cover_Shutter extends GT_CoverBehavior {
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
return aCoverVariable;
}
@@ -32,35 +31,35 @@ public class GT_Cover_Shutter
}
public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0));
}
public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0));
}
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0));
}
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 3 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return aCoverVariable >= 2 ? aCoverVariable == 2 : (aTileEntity instanceof IMachineProgress) ? ((IMachineProgress) aTileEntity).isAllowedToWork() ? aCoverVariable % 2 == 0 : aCoverVariable % 2 != 0 : true;
+ return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0);
}
public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
index f7c7a95ca3..a820e880d2 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
@@ -9,8 +9,7 @@ import net.minecraft.item.ItemStack;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
-public class GT_Cover_SolarPanel
- extends GT_CoverBehavior {
+public class GT_Cover_SolarPanel extends GT_CoverBehavior {
private final int mVoltage;
public GT_Cover_SolarPanel(int aVoltage) {
@@ -43,7 +42,7 @@ public class GT_Cover_SolarPanel
}
}
}
- if (coverState == 1 /*|| (coverState == 2 && aTimer % 8L == 0L)*/) {
+ if (coverState == 1 ) {
aTileEntity.injectEnergyUnits((byte) 6, ((100L-(long)coverNum)*((long)this.mVoltage))/100L, 1L);
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java
index 598188138f..715ec599a1 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java
@@ -5,8 +5,7 @@ import gregtech.api.interfaces.tileentity.IMachineProgress;
import gregtech.api.util.GT_CoverBehavior;
import gregtech.api.util.GT_Utility;
-public class GT_Cover_Vent
- extends GT_CoverBehavior {
+public class GT_Cover_Vent extends GT_CoverBehavior {
private final int mEfficiency;
public GT_Cover_Vent(int aEfficiency) {
diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java
index 5965bf6035..a88f91ddc4 100644
--- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java
+++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java
@@ -30,9 +30,6 @@ import thaumcraft.api.ThaumcraftApiHelper;
import java.util.concurrent.ConcurrentHashMap;
public class GT_Achievements {
-
- //public static List<Materials> oreList = new ArrayList<Materials>();
- //public static List<Integer[]> oreStats = new ArrayList<Integer[]>();
public static int oreReg = -1;
public static int assReg=-1;
public ConcurrentHashMap<String, Achievement> achievementList;
@@ -43,39 +40,7 @@ public class GT_Achievements {
public GT_Achievements() {
this.achievementList = new ConcurrentHashMap<>();
this.issuedAchievements = new ConcurrentHashMap<>();
- /*int oreList_sS=oreList.size();
- for (int i = 0; i < oreList_sS; i++) {
- if (oreList.get(i) != null) {
- if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) {
- GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore");
-
- StringBuilder dimensions = new StringBuilder();
- boolean isFirst = true;
- if (oreStats.get(i)[3] == 1) {
- dimensions.append("Overworld");
- isFirst = false;
- }
- if (oreStats.get(i)[4] == 1) {
- if (!isFirst) dimensions.append("/");
- dimensions.append("Nether");
- isFirst = false;
- }
- if (oreStats.get(i)[5] == 1) {
- if (!isFirst) dimensions.append("/");
- dimensions.append("End");
- isFirst = false;
- }
- GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString());
- }
- //if(oreList.get(i)==null)
- // GT_Log.out.println("GT Achievement - Ore with NULL pointer material tries to register achievement.");
- //if(oreList.get(i).name()==null)
- // GT_Log.out.println("GT Achievement - Ore with NULL named material tries to register achievement.");
- //else
- registerOreAchievement(oreList.get(i));
- }
- }
-*/
+
for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList)
registerAssAchievement(recipe);
@@ -214,13 +179,6 @@ public class GT_Achievements {
registerAchievement("whatnow", 8, 10, ItemList.ZPM2.get(1), "denseaspossible", false);
}
-// if(Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres){
-// for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
-// if ((GregTech_API.sGeneratedMaterials[i] != null) && !oreList.contains(GregTech_API.sGeneratedMaterials[i])) {
-// codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1));
-// }
-// }
-// }
if (GT_Mod.gregtechproxy.mAchievements) {
AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) this.achievementList.values().toArray(
new Achievement[this.achievementList.size()])));
@@ -230,11 +188,6 @@ public class GT_Achievements {
}
public static void registerOre(Materials aMaterial, int min, int max, int chance, boolean overworld, boolean nether, boolean end) {
- /*if (aMaterial != Materials._NULL) {
- oreList.add(aMaterial);
- //if(!oreList.add(aMaterial)) Minecraft.getMinecraft().crashed(new CrashReport("GT Achievement - Ore with that (" + aMaterial.name() + ") material already exists.",new IllegalArgumentException()));
- }
- oreStats.add(new Integer[]{min, max, chance, overworld ? 1 : 0, nether ? 1 : 0, end ? 1 : 0});*/
}
public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement, boolean special) {
@@ -273,12 +226,6 @@ public class GT_Achievements {
}
public Achievement registerOreAchievement(Materials aMaterial) {
- /*
- if (this.achievementList.get(aMaterial.mName) == null) {
- oreReg++;
- return registerAchievement(aMaterial.mName, -(6 + oreReg % 5), ((oreReg) / 5) - 8, new ItemStack(GregTech_API.sBlockOres1, 1,
- aMaterial.mMetaItemSubID), AchievementList.openInventory, false);
- }*/
return null;
}
@@ -295,14 +242,7 @@ public class GT_Achievements {
if (entityplayer == null || !GT_Mod.gregtechproxy.mAchievements) {
return;
}
-// if (this.achievementList.containsKey(textId)) {
-// if(this.issuedAchievements.containsKey((entityplayer.getDisplayName()+textId))){
-// return;
-// }else{
-// this.issuedAchievements.put((entityplayer.getDisplayName()+textId), true);
entityplayer.triggerAchievement((StatBase) this.achievementList.get(textId));
-// }
-// }
}
public Achievement getAchievement(String textId) {
@@ -374,13 +314,10 @@ public class GT_Achievements {
if (player == null || stack == null) {
return;
}
- //if(stack.getItem()==Items.paper){player.inventory.addItemStackToInventory(new ItemStack(Blocks.stone_slab,2));}//TODO REALLY BLOODASP, REALLY
ItemData data = GT_OreDictUnificator.getItemData(stack);
if (data != null) {
if (data.mPrefix == OrePrefixes.dust && data.mMaterial.mMaterial == Materials.Bronze) {
issueAchievement(player, "bronze");
-// } else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == Materials.Advanced) {
-// issueAchievement(player, "stepforward");
}
}
if (stack.getUnlocalizedName().startsWith("gt.metaitem.")) {