This commit is contained in:
Dream-Master 2016-04-01 20:02:42 +02:00
parent aeb50268c7
commit c1a96e3356
2 changed files with 27 additions and 25 deletions

View file

@ -84,7 +84,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
} }
} }
if (getDamageOfStack(yourStack) >= getMaxDamageEx() - 1) { if (getDamageOfStack(yourStack) >= getMaxDamageEx() - 1) {
reactor.setItemAt(x, y, sDepleted.copy()); reactor.setItemAt(x, y, sDepleted.copy());
} else if (heatrun) { } else if (heatrun) {
damageItemStack(yourStack, 1); damageItemStack(yourStack, 1);
} }
@ -92,14 +92,14 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
protected int getFinalHeat(IReactor reactor, ItemStack stack, int x, int y, int heat) protected int getFinalHeat(IReactor reactor, ItemStack stack, int x, int y, int heat)
{ {
if (sMox&&reactor.isFluidCooled()) if (sMox&&reactor.isFluidCooled())
{ {
float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat(); float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat();
if (breedereffectiveness > 0.5D) { if (breedereffectiveness > 0.5D) {
heat *= 2; heat *= 2;
}
} }
return heat; }
return heat;
} }
private void checkHeatAcceptor(IReactor reactor, int x, int y, ArrayList<ItemStackCoord> heatAcceptors) { 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) { public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) {
if (!heatrun) { if (!heatrun) {
if(sMox){ if(sMox){
float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat(); float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat();
float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F; float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F;
reactor.addOutput(ReaktorOutput * this.sEnergy); reactor.addOutput(ReaktorOutput * this.sEnergy);
}else{ }else{
reactor.addOutput((float) (1.0F * this.sEnergy));} reactor.addOutput((float) (1.0F * this.sEnergy));}
} }
return true; return true;
} }

View file

@ -1,6 +1,7 @@
package gregtech.api.items; package gregtech.api.items;
import ic2.core.util.StackUtil; import ic2.core.util.StackUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -38,9 +39,10 @@ public class GT_RadioactiveCell_Item
} }
protected static int triangularNumber(int x) protected static int triangularNumber(int x)
{ {
return (x * x + x) / 2; return (x * x + x) / 2;
} }
protected boolean outputPulseForStack(ItemStack aStack) { protected boolean outputPulseForStack(ItemStack aStack) {
NBTTagCompound tNBT = aStack.getTagCompound(); NBTTagCompound tNBT = aStack.getTagCompound();
if (tNBT == null) { if (tNBT == null) {
@ -133,8 +135,8 @@ public class GT_RadioactiveCell_Item
setDamageForStack(stack, getDamageOfStack(stack) + Dmg); setDamageForStack(stack, getDamageOfStack(stack) + Dmg);
} }
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
super.addAdditionalToolTips(aList, aStack); super.addAdditionalToolTips(aList, aStack, aPlayer);
//aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs"); //aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs");
aList.add("Durability: " + (this.maxDmg - getDurabilityOfStack(aStack)) + "/" + this.maxDmg); aList.add("Durability: " + (this.maxDmg - getDurabilityOfStack(aStack)) + "/" + this.maxDmg);
} }