Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //TODO: temporary inner class, remove later [TEST]
- private final class ItemButton extends GuiButton{
- private ItemStack item;
- public ItemButton(int buttonId, int x, int y, String buttonText, ItemStack i) {
- super(buttonId, x, y, 16, 16, buttonText);
- item = new ItemStack(i.getItem(), 1, i.getMetadata());
- }
- @Override
- public void drawButton(Minecraft mc, int mouseX, int mouseY){
- if (item != null && item.getItem() != null){
- drawItem();
- }
- }
- private void drawItem(){
- itemRender.renderItemOverlayIntoGUI(fontRendererObj, item, this.xPosition, this.yPosition, "This is a particularly interesting test.");
- }
- public ItemStack getItemStack(){
- return item;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement