Update a screenshot.

This commit is contained in:
Raoul Van den Berge
2016-03-22 21:18:40 +01:00
parent 17c243b9a1
commit d146c0aa2e
3 changed files with 21 additions and 3 deletions

View File

@@ -156,10 +156,15 @@ public abstract class GuiBase extends GuiContainer
public void drawItem(int x, int y, ItemStack stack)
{
drawItem(x, y, stack, false);
drawItem(x, y, stack, false, null);
}
public void drawItem(int x, int y, ItemStack stack, boolean withOverlay)
{
drawItem(x, y, stack, false, null);
}
public void drawItem(int x, int y, ItemStack stack, boolean withOverlay, String message)
{
zLevel = 200.0F;
itemRender.zLevel = 200.0F;
@@ -180,7 +185,7 @@ public abstract class GuiBase extends GuiContainer
if (withOverlay)
{
itemRender.renderItemOverlayIntoGUI(font, stack, x, y, null);
itemRender.renderItemOverlayIntoGUI(font, stack, x, y, message);
}
zLevel = 0.0F;

View File

@@ -232,7 +232,20 @@ public class GuiGrid extends GuiBase
{
if (slot < items.size())
{
drawItem(x, y, items.get(slot).toItemStack(), true);
int qty = items.get(slot).getQuantity();
String text = String.valueOf(qty);
if (qty >= 1000000)
{
text = String.valueOf((int) Math.floor(qty / 1000000)) + "M";
}
else if (qty >= 1000)
{
text = String.valueOf((int) Math.floor(qty / 1000)) + "K";
}
drawItem(x, y, items.get(slot).toItemStack(), true, text);
}
if (inBounds(x, y, 16, 16, mouseX, mouseY) || !grid.isConnected())