aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorDream-Master <dream-master@gmx.net>2015-12-30 01:05:10 +0100
committerDream-Master <dream-master@gmx.net>2015-12-30 01:05:10 +0100
commitd741647dbeaa39e4671970a1d2bbefd4b32c85aa (patch)
tree1174fed533c43c80e10a6163ab775724a45a23af /src/main/java/gregtech/api
parente9754ee222d253db107ea70448e77955a622087e (diff)
downloadGT5-Unofficial-d741647dbeaa39e4671970a1d2bbefd4b32c85aa.tar.gz
GT5-Unofficial-d741647dbeaa39e4671970a1d2bbefd4b32c85aa.tar.bz2
GT5-Unofficial-d741647dbeaa39e4671970a1d2bbefd4b32c85aa.zip
Now Mox cells working like in ic2
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java38
1 files changed, 19 insertions, 19 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 6289f22a6c..59326a06d3 100644
--- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
+++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
@@ -22,7 +22,6 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
public final ItemStack sDepleted;
public final boolean sMox;
-
public GT_RadioactiveCellIC_Item(String aUnlocalized, String aEnglish, int aCellcount, int maxDamage, float aEnergy, int aRadiation, float aHeat, ItemStack aDepleted, boolean aMox) {
super(aUnlocalized, aEnglish, aCellcount);
setMaxStackSize(64);
@@ -59,10 +58,11 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
} else {
pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
- //int heat = sumUp(pulses) * 4;
+// int heat = sumUp(pulses) * 4;
+
+ int heat = triangularNumber(pulses) * 4;
- int heat = triangularNumber(pulses) * 4;
- heat = getFinalHeat(reactor, yourStack, x, y, heat);
+ heat = getFinalHeat(reactor, yourStack, x, y, heat);
ArrayList<ItemStackCoord> heatAcceptors = new ArrayList();
checkHeatAcceptor(reactor, x - 1, y, heatAcceptors);
@@ -84,23 +84,23 @@ 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())
{
- if (sMox&&reactor.isFluidCooled())
- {
- float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat();
- if (breedereffectiveness > 0.5D) {
- heat *= 2;
- }
- }
- return heat;
+ float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat();
+ if (breedereffectiveness > 0.5D) {
+ heat *= 2;
}
+ }
+ return heat;
+ }
private void checkHeatAcceptor(IReactor reactor, int x, int y, ArrayList<ItemStackCoord> heatAcceptors) {
ItemStack thing = reactor.getItemAt(x, y);
@@ -113,10 +113,10 @@ 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 = reactor.getHeat() / reactor.getMaxHeat();
- float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F;
- reactor.addOutput(ReaktorOutput * this.sEnergy);
- }else{
+ 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;
@@ -162,4 +162,4 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
this.y = y1;
}
}
-}
+} \ No newline at end of file