aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
blob: 1430dcda8fe7b82e19b3cd52a277a9f6f2b94286 (plain)
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
package gregtech.common.items;

import gregtech.api.items.GT_Generic_Item;
import ic2.api.reactor.IReactor;
import ic2.api.reactor.IReactorComponent;
import ic2.core.item.reactor.ItemReactorMOX;
import net.minecraft.item.ItemStack;

public class GT_NeutronReflector_Item
  extends GT_Generic_Item
  implements IReactorComponent
{
  public GT_NeutronReflector_Item(String aUnlocalized, String aEnglish, int aMaxDamage)
  {
    super(aUnlocalized, aEnglish, "Undestructable");
    this.setMaxStackSize(64);
    this.setMaxDamage(aMaxDamage);
  }
  
  public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) {
	    if (!heatrun)
	    {
	      if ((pulsingStack.getItem() instanceof ItemReactorMOX))
	      {
	        float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat();
	        float ReaktorOutput = 4.0F * breedereffectiveness + 1.0F;
	        reactor.addOutput(ReaktorOutput);
	      }
	      else
	      {
	        reactor.addOutput(1.0F);
	      }
	    }
	    return true;
	  }
  
  public boolean canStoreHeat(IReactor aReactor, ItemStack aStack, int x, int y)
  {
    return false;
  }
  
  public int getMaxHeat(IReactor aReactor, ItemStack aStack, int x, int y)
  {
    return 0;
  }
  
  public int getCurrentHeat(IReactor aReactor, ItemStack aStack, int x, int y)
  {
    return 0;
  }
  
  public float influenceExplosion(IReactor aReactor, ItemStack aStack)
  {
    return -1.0F;
  }
  
  public int alterHeat(IReactor aReactor, ItemStack aStack, int x, int y, int aHeat)
  {
    return aHeat;
  }
  
  public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) {}
}