gui cheat overlay
This commit is contained in:
parent
d629e8fb7b
commit
424cf782bc
19 changed files with 74 additions and 3005 deletions
|
@ -2,168 +2,131 @@ package game.item;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import game.enchantment.EnumEnchantmentType;
|
||||
import game.init.Blocks;
|
||||
import game.init.ItemRegistry;
|
||||
import game.init.Items;
|
||||
|
||||
public abstract class CheatTab
|
||||
public enum CheatTab
|
||||
{
|
||||
public static final CheatTab[] TABS = new CheatTab[16];
|
||||
public static final CheatTab tabBlocks = new CheatTab("Baumaterial")
|
||||
tabBlocks("Baumaterial")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.glass);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabNature = new CheatTab("Gestein und Natur")
|
||||
},
|
||||
tabNature("Gestein und Natur")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.grass);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabWood = new CheatTab("Holz")
|
||||
},
|
||||
tabWood("Holz")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.maple_planks);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabPlants = new CheatTab("Pflanzen")
|
||||
},
|
||||
tabPlants("Pflanzen")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.oak_leaves);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabDeco = new CheatTab("Dekoration")
|
||||
},
|
||||
tabDeco("Dekoration")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.hay_block);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabTech = new CheatTab("Redstone & Technik")
|
||||
},
|
||||
tabTech("Redstone & Technik")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.tnt);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabGems = new CheatTab("Erze & Teure Blöcke")
|
||||
},
|
||||
tabGems("Erze & Teure Blöcke")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.diamond_block);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabInventory = new CheatTab("Inventar öffnen")
|
||||
},
|
||||
tabSpawners("Mob & Itemspawner")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return ItemRegistry.getItemFromBlock(Blocks.chest);
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabSpawners = new CheatTab("Mob & Itemspawner")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.minecart;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabTools = new CheatTab("Werkzeug")
|
||||
},
|
||||
tabTools("Werkzeug")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.flint_and_steel;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabCombat = new CheatTab("Kampf")
|
||||
},
|
||||
tabCombat("Kampf")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.bow;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabMagic = new CheatTab("Tränke & Verzauberungen")
|
||||
},
|
||||
tabMagic("Tränke & Verzauberungen")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.potion;
|
||||
}
|
||||
public int getIconItemDamage()
|
||||
protected int getIconItemDamage()
|
||||
{
|
||||
return 8261;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabMaterials = new CheatTab("Werkstoffe")
|
||||
},
|
||||
tabMaterials("Werkstoffe")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.leather;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabMetals = new CheatTab("Metalle und Juwelen")
|
||||
},
|
||||
tabMetals("Metalle und Juwelen")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.iron_ingot;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabMisc = new CheatTab("Verschiedenes & Nahrung")
|
||||
},
|
||||
tabMisc("Verschiedenes & Nahrung")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
protected Item getTabIconItem()
|
||||
{
|
||||
return Items.charge_crystal;
|
||||
}
|
||||
};
|
||||
public static final CheatTab tabEtc = new CheatTab("...")
|
||||
{
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return Items.navigator;
|
||||
}
|
||||
};
|
||||
|
||||
private static int nextTabId;
|
||||
|
||||
private final int tabIndex;
|
||||
private final String name;
|
||||
private EnumEnchantmentType[] enchantmentTypes;
|
||||
private ItemStack iconItemStack;
|
||||
|
||||
public CheatTab(String name)
|
||||
private CheatTab(String name)
|
||||
{
|
||||
this.tabIndex = nextTabId++;
|
||||
this.name = name;
|
||||
TABS[this.tabIndex] = this;
|
||||
}
|
||||
|
||||
public boolean isRight()
|
||||
public int getHorizontal()
|
||||
{
|
||||
return this.getTabColumn() == (TABS.length + 1) / 2 - 1;
|
||||
return this.ordinal() % 12;
|
||||
}
|
||||
|
||||
public boolean isLeft()
|
||||
public int getVertical()
|
||||
{
|
||||
return this.getTabColumn() == 0;
|
||||
}
|
||||
|
||||
public int getTabColumn()
|
||||
{
|
||||
return this.tabIndex % ((TABS.length + 1) / 2);
|
||||
}
|
||||
|
||||
public boolean isTop()
|
||||
{
|
||||
return this.tabIndex < (TABS.length + 1) / 2;
|
||||
}
|
||||
|
||||
public int getIndex()
|
||||
{
|
||||
return this.tabIndex;
|
||||
return this.ordinal() / 12;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
@ -181,9 +144,9 @@ public abstract class CheatTab
|
|||
return this.iconItemStack;
|
||||
}
|
||||
|
||||
public abstract Item getTabIconItem();
|
||||
protected abstract Item getTabIconItem();
|
||||
|
||||
public int getIconItemDamage()
|
||||
protected int getIconItemDamage()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue