// Path: src/main/java/net/frozenbit/plugin5zig/cubecraft/gamemodes/TowerDefenceGameMode.java
// public class TowerDefenceGameMode extends CubeCraftGameMode {
//     private List<Tower> towers = Collections.emptyList();
//     private int coins;
//     private int exp;
//     private int castleHealth;
// 
//     @Override
//     public boolean isStalkerEnabled() {
//         return false;
//     }
// 
//     @Override
//     public Stalker getStalker() {
//         throw new IllegalStateException("Stalker is not enabled");
//     }
// 
//     @Override
//     public String getName() {
//         return "Tower Defence";
//     }
// 
//     public List<Tower> getTowers() {
//         return towers;
//     }
// 
//     public void setTowers(List<Tower> towers) {
//         this.towers = towers;
//     }
// 
//     public int getCoins() {
//         return coins;
//     }
// 
//     public void setCoins(int coins) {
//         this.coins = coins;
//     }
// 
//     public int getExp() {
//         return exp;
//     }
// 
//     public void setExp(int exp) {
//         this.exp = exp;
//     }
// 
//     public int getCastleHealth() {
//         return castleHealth;
//     }
// 
//     public void setCastleHealth(int castleHealth) {
//         this.castleHealth = castleHealth;
//     }
// 
//     public static class Tower {
//         public final String name;
//         public final String shortName;
//         public final int price;
//         public final ItemStack icon;
// 
//         public Tower(String name, int price, ItemStack icon) {
//             this.name = name;
//             this.shortName = name.replaceAll(" Tower$", "");
//             this.price = price;
//             this.icon = icon;
//         }
//     }
// }


import com.google.common.collect.ImmutableList;
import eu.the5zig.mod.The5zigAPI;
import eu.the5zig.mod.modules.GameModeItem;
import eu.the5zig.mod.render.RenderLocation;
import eu.the5zig.mod.server.GameState;
import eu.the5zig.util.minecraft.ChatColor;
import net.frozenbit.plugin5zig.cubecraft.gamemodes.TowerDefenceGameMode;
import java.util.List;
import static java.lang.String.format;
package net.frozenbit.plugin5zig.cubecraft.items;





public class TowerBanterItem extends GameModeItem<TowerDefenceGameMode> {
    private static final List<TowerDefenceGameMode.Tower> DUMMY_TOWERS = ImmutableList.of(
            new TowerDefenceGameMode.Tower("Ice Tower", 80, The5zigAPI.getAPI().getItemByName("bow")),
            new TowerDefenceGameMode.Tower("Artillery Tower", 100, The5zigAPI.getAPI().getItemByName("tnt")),
            new TowerDefenceGameMode.Tower("Mage Tower", 200, The5zigAPI.getAPI().getItemByName("dragon_egg")),
            new TowerDefenceGameMode.Tower("Poison Tower", 800, The5zigAPI.getAPI().getItemByName("potion")),
            new TowerDefenceGameMode.Tower("Leach Tower", 2000, The5zigAPI.getAPI().getItemByName("nether_star"))
    );

    public TowerBanterItem() {
        super(TowerDefenceGameMode.class, GameState.GAME, GameState.ENDGAME);
    }

    @Override
    public void render(int x, int y, RenderLocation renderLocation, boolean dummy) {
        int lineCount = 0;
        The5zigAPI.getAPI().getRenderHelper().drawString(getPrefix(), x, y);
        lineCount++;
        int coins = dummy ? 250 : getGameMode().getCoins();
        List<TowerDefenceGameMode.Tower> towers = getTowers(dummy);
        if (towers.isEmpty()) {
            The5zigAPI.getAPI().getRenderHelper().drawString(
                    ChatColor.DARK_GRAY + (ChatColor.ITALIC + "Open the tower build menu"), x, y + 10);
            The5zigAPI.getAPI().getRenderHelper().drawString(
                    ChatColor.DARK_GRAY + (ChatColor.ITALIC + "to activate this item"), x, y + 20);
        }
// Path: src/main/java/net/frozenbit/plugin5zig/cubecraft/gamemodes/TowerDefenceGameMode.java
// public class TowerDefenceGameMode extends CubeCraftGameMode {
//     private List<Tower> towers = Collections.emptyList();
//     private int coins;
//     private int exp;
//     private int castleHealth;
// 
//     @Override
//     public boolean isStalkerEnabled() {
//         return false;
//     }
// 
//     @Override
//     public Stalker getStalker() {
//         throw new IllegalStateException("Stalker is not enabled");
//     }
// 
//     @Override
//     public String getName() {
//         return "Tower Defence";
//     }
// 
//     public List<Tower> getTowers() {
//         return towers;
//     }
// 
//     public void setTowers(List<Tower> towers) {
//         this.towers = towers;
//     }
// 
//     public int getCoins() {
//         return coins;
//     }
// 
//     public void setCoins(int coins) {
//         this.coins = coins;
//     }
// 
//     public int getExp() {
//         return exp;
//     }
// 
//     public void setExp(int exp) {
//         this.exp = exp;
//     }
// 
//     public int getCastleHealth() {
//         return castleHealth;
//     }
// 
//     public void setCastleHealth(int castleHealth) {
//         this.castleHealth = castleHealth;
//     }
// 
//     public static class Tower {
//         public final String name;
//         public final String shortName;
//         public final int price;
//         public final ItemStack icon;
// 
//         public Tower(String name, int price, ItemStack icon) {
//             this.name = name;
//             this.shortName = name.replaceAll(" Tower$", "");
//             this.price = price;
//             this.icon = icon;
//         }
//     }
// }


// Path: src/main/java/net/frozenbit/plugin5zig/cubecraft/items/TowerBanterItem.java
import com.google.common.collect.ImmutableList;
import eu.the5zig.mod.The5zigAPI;
import eu.the5zig.mod.modules.GameModeItem;
import eu.the5zig.mod.render.RenderLocation;
import eu.the5zig.mod.server.GameState;
import eu.the5zig.util.minecraft.ChatColor;
import net.frozenbit.plugin5zig.cubecraft.gamemodes.TowerDefenceGameMode;
import java.util.List;
import static java.lang.String.format;

package net.frozenbit.plugin5zig.cubecraft.items;





public class TowerBanterItem extends GameModeItem<TowerDefenceGameMode> {
    private static final List<TowerDefenceGameMode.Tower> DUMMY_TOWERS = ImmutableList.of(
            new TowerDefenceGameMode.Tower("Ice Tower", 80, The5zigAPI.getAPI().getItemByName("bow")),
            new TowerDefenceGameMode.Tower("Artillery Tower", 100, The5zigAPI.getAPI().getItemByName("tnt")),
            new TowerDefenceGameMode.Tower("Mage Tower", 200, The5zigAPI.getAPI().getItemByName("dragon_egg")),
            new TowerDefenceGameMode.Tower("Poison Tower", 800, The5zigAPI.getAPI().getItemByName("potion")),
            new TowerDefenceGameMode.Tower("Leach Tower", 2000, The5zigAPI.getAPI().getItemByName("nether_star"))
    );

    public TowerBanterItem() {
        super(TowerDefenceGameMode.class, GameState.GAME, GameState.ENDGAME);
    }

    @Override
    public void render(int x, int y, RenderLocation renderLocation, boolean dummy) {
        int lineCount = 0;
        The5zigAPI.getAPI().getRenderHelper().drawString(getPrefix(), x, y);
        lineCount++;
        int coins = dummy ? 250 : getGameMode().getCoins();
        List<TowerDefenceGameMode.Tower> towers = getTowers(dummy);
        if (towers.isEmpty()) {
            The5zigAPI.getAPI().getRenderHelper().drawString(
                    ChatColor.DARK_GRAY + (ChatColor.ITALIC + "Open the tower build menu"), x, y + 10);
            The5zigAPI.getAPI().getRenderHelper().drawString(
                    ChatColor.DARK_GRAY + (ChatColor.ITALIC + "to activate this item"), x, y + 20);
        }
        for (TowerDefenceGameMode.Tower tower : towers) {