aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java17
2 files changed, 9 insertions, 12 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
index b497ccaa8e..7a1ae279c1 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
@@ -25,7 +25,6 @@ import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
import gregtech.common.render.GT_Renderer_Block;
import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest;
-import gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -412,8 +411,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
if (tTileEntity instanceof IGregTechTileEntity) {
final IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity;
mTemporaryTileEntity.set(tGregTechTileEntity);
- if (!(tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_SuperChest
- || tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_QuantumChest)) {
+ if (!(tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_QuantumChest)) {
for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); i++) {
final ItemStack tItem = tGregTechTileEntity.getStackInSlot(i);
if ((tItem != null) && (tItem.stackSize > 0) && (tGregTechTileEntity.isValidSlot(i))) {
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index 95de8da0c2..6ee2db6b6e 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -328,8 +328,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
super.onUpdate(aStack, aWorld, aPlayer, aTimer, aIsInHand);
final short tDamage = (short) getDamage(aStack);
final EntityLivingBase tPlayer = (EntityPlayer) aPlayer;
- if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperChest
- || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumChest
+ if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumChest
|| GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank
|| GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) {
final NBTTagCompound tNBT = aStack.stackTagCompound;
@@ -342,19 +341,19 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
|| (tNBT.hasKey("mFluid")
&& FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) {
final FluidStack tFluid = FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid"));
- int tLasing = 1200;
+ int tEffectDuration = 1200;
if (tFluid != null) {
final double tFluidAmount = tFluid.amount;
final double tMiddlePoint = 4096000;
final double tSmoothingCoefficient = 2000000;
- final int tMaxLastingTime = 12000;
+ final int tMaxDuration = 12000;
final double tmp = (tFluidAmount - tMiddlePoint) / tSmoothingCoefficient;
- tLasing = (int) (Math.exp(tmp) / (Math.exp(tmp) + Math.exp(-tmp)) * tMaxLastingTime);
+ tEffectDuration = (int) (Math.exp(tmp) / (Math.exp(tmp) + Math.exp(-tmp)) * tMaxDuration);
}
- tPlayer.addPotionEffect(new PotionEffect(Potion.hunger.id, tLasing, 1));
- tPlayer.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, tLasing, 1));
- tPlayer.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, tLasing, 1));
- tPlayer.addPotionEffect(new PotionEffect(Potion.weakness.id, tLasing, 1));
+ tPlayer.addPotionEffect(new PotionEffect(Potion.hunger.id, tEffectDuration, 1));
+ tPlayer.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, tEffectDuration, 1));
+ tPlayer.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, tEffectDuration, 1));
+ tPlayer.addPotionEffect(new PotionEffect(Potion.weakness.id, tEffectDuration, 1));
}
}
}