some tweaks to the values

This commit is contained in:
modmuss50 2015-06-22 18:32:08 +01:00
parent 74a9ace574
commit 5fbe42c026
2 changed files with 15 additions and 2 deletions

View file

@ -44,11 +44,14 @@ public class GuiMatterFabricator extends GuiContainer{
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
int p_146979_2_)
{
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
String name = StatCollector.translateToLocal("tile.techreborn.matterfabricator.name");
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(
I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
this.fontRendererObj.drawString(containerMatterFabricator.getProgressScaled(100) + "%", 80, 50, 4210752);
}
}

View file

@ -18,7 +18,7 @@ import techreborn.util.ItemUtils;
public class TileMatterFabricator extends TileMachineBase implements IWrenchable, IEnergyTile, IInventory, ISidedInventory {
public static int fabricationRate = 166666;
public static int fabricationRate = 2666656;
public int tickTime;
public BasicSink energy;
public Inventory inventory = new Inventory(7, "TileMatterFabricator", 64);
@ -183,7 +183,8 @@ public class TileMatterFabricator extends TileMachineBase implements IWrenchable
for (int i = 0; i < 5; i++) {
ItemStack stack = inventory.getStackInSlot(i);
if (this.amplifier < 100000 && stack != null) {
int amp = (int) ((long) (getValue(stack) * (long) this.maxProgresstime() / 166666L));
int amp = (int) ((long) (getValue(stack) / 32));
System.out.println(amp);
if (ItemUtils.isItemEqual(stack, inventory.getStackInSlot(i), true, true)) {
this.amplifier += amp;
inventory.decrStackSize(i, 1);
@ -191,6 +192,8 @@ public class TileMatterFabricator extends TileMachineBase implements IWrenchable
}
}
if (this.amplifier > 0) {
if (this.amplifier > this.energy.getEnergyStored()) {
this.progresstime += this.energy.getEnergyStored();
@ -201,8 +204,15 @@ public class TileMatterFabricator extends TileMachineBase implements IWrenchable
this.decreaseStoredEnergy(this.amplifier, true);
this.amplifier = 0;
}
} else if(amplifier == 0){
if(energy.useEnergy(4096)){
this.progresstime += 50;
}
}
if (this.progresstime > this.maxProgresstime() && this.spaceForOutput()) {
this.progresstime -= this.maxProgresstime();
this.addOutputProducts();