Make interface a bit slower.
This commit is contained in:
@@ -234,7 +234,7 @@ public class GuiGrid extends GuiBase
|
||||
{
|
||||
int qty = items.get(slot).getQuantity();
|
||||
|
||||
String text = String.valueOf(qty);
|
||||
String text;
|
||||
|
||||
if (qty >= 1000000)
|
||||
{
|
||||
@@ -244,6 +244,14 @@ public class GuiGrid extends GuiBase
|
||||
{
|
||||
text = String.valueOf((int) Math.floor(qty / 1000)) + "K";
|
||||
}
|
||||
else if (qty == 1)
|
||||
{
|
||||
text = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = String.valueOf(qty);
|
||||
}
|
||||
|
||||
drawItem(x, y, items.get(slot).toItemStack(), true, text);
|
||||
}
|
||||
|
@@ -20,6 +20,8 @@ public class TileInterface extends TileMachine implements ICompareSetting, ISide
|
||||
|
||||
private int compare = 0;
|
||||
|
||||
private int currentSlot = 0;
|
||||
|
||||
@Override
|
||||
public int getEnergyUsage()
|
||||
{
|
||||
@@ -29,17 +31,34 @@ public class TileInterface extends TileMachine implements ICompareSetting, ISide
|
||||
@Override
|
||||
public void updateMachine()
|
||||
{
|
||||
for (int i = 0; i < 9; ++i)
|
||||
if (ticks % 5 == 0)
|
||||
{
|
||||
if (inventory.getStackInSlot(i) != null)
|
||||
{
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
ItemStack slot = inventory.getStackInSlot(currentSlot);
|
||||
|
||||
while ((slot = inventory.getStackInSlot(currentSlot)) == null)
|
||||
{
|
||||
currentSlot++;
|
||||
|
||||
if (currentSlot > 8)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (inventory.getStackInSlot(currentSlot) != null)
|
||||
{
|
||||
if (getController().push(slot))
|
||||
{
|
||||
inventory.setInventorySlotContents(i, null);
|
||||
inventory.setInventorySlotContents(currentSlot, null);
|
||||
}
|
||||
}
|
||||
|
||||
currentSlot++;
|
||||
|
||||
if (currentSlot > 8)
|
||||
{
|
||||
currentSlot = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 9; i < 18; ++i)
|
||||
|
Reference in New Issue
Block a user