mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
First armor modifier
This commit is contained in:
1 parent
8b154a9cb4
commit
90f09b7e2d
12 files changed
+299
-19
No files matched your search
@@ -17,6 +17,7 @@ import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.blocks.logic.CraftingStationLogic;
|
||||
import tconstruct.library.armor.ArmorCore;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
public class CraftingStationGui extends GuiContainer
|
||||
@@ -67,6 +68,26 @@ public class CraftingStationGui extends GuiContainer
|
||||
|
||||
drawModularToolStats(stack, tool, tags);
|
||||
}
|
||||
else if (stack.getItem() instanceof ArmorCore)
|
||||
{
|
||||
ArmorCore armor = (ArmorCore) stack.getItem();
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("TinkerArmor");
|
||||
this.drawCenteredString(fontRenderer, "\u00A7n" + armor.getClass().getSimpleName(), xSize + 63, 8, 0xffffff);
|
||||
|
||||
drawModularArmorStats(stack, armor, tags);
|
||||
}
|
||||
}
|
||||
|
||||
void drawModularArmorStats (ItemStack stack, ArmorCore tool, NBTTagCompound tags)
|
||||
{
|
||||
int modifiers = tags.getInteger("Modifiers");
|
||||
int base = 24;
|
||||
int offset = 0;
|
||||
if (modifiers > 0)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation18") + tags.getInteger("Modifiers"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
|
||||
void drawModularToolStats (ItemStack stack, ToolCore tool, NBTTagCompound tags)
|
||||
|
||||
Reference in new issue
Block a user