#2302 Fix vat crash

This commit is contained in:
tterrag1098 committed 2015-04-13 04:11:30 -04:00
1 parent eae3c8be49
commit f3bee2c922
3 files changed
+8 -1

No files matched your search

@@ -1,5 +1,7 @@
package crazypants.enderio.machine;
import javax.annotation.Nullable;
import net.minecraft.nbt.NBTTagCompound;
import crazypants.enderio.machine.IMachineRecipe.ResultStack;
import crazypants.enderio.machine.recipe.RecipeBonusType;
@@ -22,6 +24,7 @@ public interface IPoweredTask {
void writeToNBT(NBTTagCompound nbtRoot);
@Nullable
IMachineRecipe getRecipe();
public abstract MachineRecipeInput[] getInputs();
@@ -39,7 +39,11 @@ public class PacketVatProgress extends MessageTileEntity<TileVat> implements IMe
break;
}
}
IMachineRecipe rec = task.getRecipe();
if (rec == null) {
return;
}
for (ResultStack res : rec.getCompletedResult(1.0f, task.getInputs())) {
if(res.fluid != null && res.fluid.getFluid() != null) {
outputFluidId = res.fluid.getFluid().getID();
@@ -189,7 +189,7 @@ public class GuiTelePad extends GuiContainerBase implements IToggleableGui {
String name = e.getCommandSenderName();
fnt.drawString(name, sx + xSize / 2 - fnt.getStringWidth(name) / 2, sy + progressY + fnt.FONT_HEIGHT + 6, 0x000000);
}
super.drawGuiContainerBackgroundLayer(p_146976_1_, p_146976_2_, p_146976_3_);
}