aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java36
-rw-r--r--src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java16
2 files changed, 27 insertions, 25 deletions
diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
index 59326a06d3..eeec476d9c 100644
--- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
+++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
@@ -61,9 +61,9 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
// int heat = sumUp(pulses) * 4;
int heat = triangularNumber(pulses) * 4;
-
+
heat = getFinalHeat(reactor, yourStack, x, y, heat);
-
+
ArrayList<ItemStackCoord> heatAcceptors = new ArrayList();
checkHeatAcceptor(reactor, x - 1, y, heatAcceptors);
checkHeatAcceptor(reactor, x + 1, y, heatAcceptors);
@@ -84,22 +84,22 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
}
}
if (getDamageOfStack(yourStack) >= getMaxDamageEx() - 1) {
- reactor.setItemAt(x, y, sDepleted.copy());
+ reactor.setItemAt(x, y, sDepleted.copy());
} else if (heatrun) {
damageItemStack(yourStack, 1);
}
}
-
+
protected int getFinalHeat(IReactor reactor, ItemStack stack, int x, int y, int heat)
{
- if (sMox&&reactor.isFluidCooled())
- {
- float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat();
- if (breedereffectiveness > 0.5D) {
- heat *= 2;
- }
+ if (sMox&&reactor.isFluidCooled())
+ {
+ float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat();
+ if (breedereffectiveness > 0.5D) {
+ heat *= 2;
}
- return heat;
+ }
+ return heat;
}
private void checkHeatAcceptor(IReactor reactor, int x, int y, ArrayList<ItemStackCoord> heatAcceptors) {
@@ -111,13 +111,13 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
}
public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) {
- if (!heatrun) {
- if(sMox){
- float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat();
- float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F;
- reactor.addOutput(ReaktorOutput * this.sEnergy);
- }else{
- reactor.addOutput((float) (1.0F * this.sEnergy));}
+ if (!heatrun) {
+ if(sMox){
+ float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat();
+ float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F;
+ reactor.addOutput(ReaktorOutput * this.sEnergy);
+ }else{
+ reactor.addOutput((float) (1.0F * this.sEnergy));}
}
return true;
}
diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java
index 9ef5266329..e990fc29b9 100644
--- a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java
+++ b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java
@@ -1,6 +1,7 @@
package gregtech.api.items;
import ic2.core.util.StackUtil;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -36,11 +37,12 @@ public class GT_RadioactiveCell_Item
}
return b;
}
-
+
protected static int triangularNumber(int x)
- {
- return (x * x + x) / 2;
- }
+ {
+ return (x * x + x) / 2;
+ }
+
protected boolean outputPulseForStack(ItemStack aStack) {
NBTTagCompound tNBT = aStack.getTagCompound();
if (tNBT == null) {
@@ -133,9 +135,9 @@ public class GT_RadioactiveCell_Item
setDamageForStack(stack, getDamageOfStack(stack) + Dmg);
}
- public void addAdditionalToolTips(List aList, ItemStack aStack) {
- super.addAdditionalToolTips(aList, aStack);
+ public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
+ super.addAdditionalToolTips(aList, aStack, aPlayer);
//aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs");
aList.add("Durability: " + (this.maxDmg - getDurabilityOfStack(aStack)) + "/" + this.maxDmg);
}
-}
+} \ No newline at end of file