1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
package gregtech.api.items;
import ic2.api.reactor.IReactor;
import ic2.api.reactor.IReactorComponent;
import net.minecraft.item.ItemStack;
public class GT_CoolantCellIC_Item
extends GT_CoolantCell_Item
implements IReactorComponent
{
public GT_CoolantCellIC_Item(String aUnlocalized, String aEnglish, int aMaxStore)
{
super(aUnlocalized, aEnglish, aMaxStore);
}
public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) {}
public boolean acceptUraniumPulse(IReactor aReactor, ItemStack aStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean aHeatRun)
{
return false;
}
public boolean canStoreHeat(IReactor aReactor, ItemStack aStack, int x, int y)
{if(aReactor.isFluidCooled()&&(getControlTagOfStack(aStack))!=0){
return false;
}
return true;
}
public int getMaxHeat(IReactor aReactor, ItemStack aStack, int x, int y)
{
return this.heatStorage;
}
public int getCurrentHeat(IReactor aReactor, ItemStack aStack, int x, int y)
{
return getHeatOfStack(aStack);
}
public float influenceExplosion(IReactor aReactor, ItemStack aStack)
{
return 1.0F + this.heatStorage / 30000.0F;
}
public int alterHeat(IReactor aReactor, ItemStack aStack, int x, int y, int aHeat)
{
int tHeat = getHeatOfStack(aStack);
if ((tHeat == 0) && (getControlTagOfStack(aStack) != 0)) {
setControlTagOfStack(aStack, 0);
}
tHeat += aHeat;
if (tHeat > this.heatStorage)
{
aReactor.setItemAt(x, y, (ItemStack)null);
aHeat = this.heatStorage - tHeat + 1;
}
else
{
if (tHeat < 0)
{
aHeat = tHeat;
tHeat = 0;
}
else
{
aHeat = 0;
}
if ((tHeat > 0) && (getControlTagOfStack(aStack) == 0) && (!aReactor.isFluidCooled())) {
setControlTagOfStack(aStack, 1);
}
setHeatForStack(aStack, tHeat);
}
return aHeat;
}
}
|