GT5-Unofficial/main/java/gregtech/common/items/GT_NeutronReflector_Item.java

69 lines
1.9 KiB
Java
Raw Normal View History

2015-04-23 16:14:22 +00:00
package gregtech.common.items;
import gregtech.api.items.GT_Generic_Item;
2015-06-07 19:25:40 +00:00
import gregtech.api.items.GT_RadioactiveCellIC_Item;
2015-04-23 16:14:22 +00:00
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
{
2015-06-07 19:25:40 +00:00
float tEnergy=1.0f;
if(pulsingStack.getItem() instanceof GT_RadioactiveCellIC_Item){
tEnergy = (float) ((GT_RadioactiveCellIC_Item)pulsingStack.getItem()).sEnergy;
}
reactor.addOutput(tEnergy);
2015-04-23 16:14:22 +00:00
}
}
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) {}
}