From e13a5c326db2f3d3dabcc0ae8c67651015a27cb5 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 11 May 2018 20:54:31 +0200 Subject: [PATCH] Added "ponify guardians" to the cluster --- .../java/com/minelittlepony/PonyRenderManager.java | 1 + .../java/com/minelittlepony/PonySettingPanel.java | 13 +++++++++++-- .../resources/assets/minelittlepony/lang/en_us.lang | 1 + .../resources/assets/minelittlepony/lang/fr_fr.lang | 8 +++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/minelittlepony/PonyRenderManager.java b/src/main/java/com/minelittlepony/PonyRenderManager.java index ac8c9898..76c143ae 100644 --- a/src/main/java/com/minelittlepony/PonyRenderManager.java +++ b/src/main/java/com/minelittlepony/PonyRenderManager.java @@ -137,6 +137,7 @@ public class PonyRenderManager { if (config.guardians) { pushNewRenderer(manager, EntityGuardian.class, new RenderPonyGuardian(manager)); pushNewRenderer(manager, EntityElderGuardian.class, new RenderPonyGuardian.Elder(manager)); + MineLittlePony.logger.info("Guardians are now ponies."); } else { restoreRenderer(EntityGuardian.class); restoreRenderer(EntityElderGuardian.class); diff --git a/src/main/java/com/minelittlepony/PonySettingPanel.java b/src/main/java/com/minelittlepony/PonySettingPanel.java index 1e2095b1..3cfdb6f4 100644 --- a/src/main/java/com/minelittlepony/PonySettingPanel.java +++ b/src/main/java/com/minelittlepony/PonySettingPanel.java @@ -11,6 +11,8 @@ import java.io.IOException; /** * In-Game options menu. + * + * TODO: What a mess */ public class PonySettingPanel extends GuiScreen { @@ -34,6 +36,7 @@ public class PonySettingPanel extends GuiScreen { private static final String ZOMBIE_PIGMEN = MOB_PREFIX + "zombiepigmen"; private static final String SKELETONS = MOB_PREFIX + "skeletons"; private static final String ILLAGERS = MOB_PREFIX + "illagers"; + private static final String GUARDIANS = MOB_PREFIX + "guardians"; private static final int PONY_ID = 0; private static final int HUMAN_ID = 1; @@ -48,6 +51,7 @@ public class PonySettingPanel extends GuiScreen { private static final int ZOMBIE_PIGMEN_ID = 9; private static final int SKELETONS_ID = 10; private static final int ILLAGER_ID = 11; + private static final int GUARDIAN_ID = 12; private PonyConfig config; @@ -63,15 +67,15 @@ public class PonySettingPanel extends GuiScreen { @Override public void initGui() { final int LEFT = width / 10 + 16; - GuiCheckbox pony, human, both, hd, sizes, snuzzles, showscale, villager, zombie, pigmen, skeleton, illager; + GuiCheckbox pony, human, both, hd, sizes, snuzzles, showscale, villager, zombie, pigmen, skeleton, illager, guardian; int row = 32; buttonList.add(pony = ponies = new GuiCheckbox(PONY_ID, LEFT, row += 15, I18n.format(PONY))); buttonList.add(human = humans = new GuiCheckbox(HUMAN_ID, LEFT, row += 15, I18n.format(HUMAN))); buttonList.add(both = this.both = new GuiCheckbox(BOTH_ID, LEFT, row += 15, I18n.format(BOTH))); row += 15; buttonList.add(hd = new GuiCheckbox(HD_ID, LEFT, row += 15, I18n.format(HD))); - buttonList.add(sizes = new GuiCheckbox(SIZES_ID, LEFT, row += 15, I18n.format(SIZES))); buttonList.add(snuzzles = new GuiCheckbox(SNUZZLES_ID, LEFT, row += 15, I18n.format(SNUZZLES))); + buttonList.add(sizes = new GuiCheckbox(SIZES_ID, LEFT, row += 15, I18n.format(SIZES))); buttonList.add(showscale = new GuiCheckbox(SHOW_SCALE_ID, LEFT, row += 15, I18n.format(SHOW_SCALE))); final int RIGHT = width - width / 3; @@ -81,6 +85,7 @@ public class PonySettingPanel extends GuiScreen { buttonList.add(pigmen = new GuiCheckbox(ZOMBIE_PIGMEN_ID, RIGHT, row += 15, I18n.format(ZOMBIE_PIGMEN))); buttonList.add(skeleton = new GuiCheckbox(SKELETONS_ID, RIGHT, row += 15, I18n.format(SKELETONS))); buttonList.add(illager = new GuiCheckbox(ILLAGER_ID, RIGHT, row += 15, I18n.format(ILLAGERS))); + buttonList.add(guardian = new GuiCheckbox(GUARDIAN_ID, RIGHT, row += 15, I18n.format(GUARDIANS))); switch (config.getPonyLevel()) { default: @@ -103,6 +108,7 @@ public class PonySettingPanel extends GuiScreen { pigmen.checked = config.pigzombies; skeleton.checked = config.skeletons; illager.checked = config.illagers; + guardian.checked = config.guardians; } @Override @@ -171,6 +177,9 @@ public class PonySettingPanel extends GuiScreen { case ILLAGER_ID: config.illagers = checked; break; + case GUARDIAN_ID: + config.guardians = checked; + break; } } } diff --git a/src/main/resources/assets/minelittlepony/lang/en_us.lang b/src/main/resources/assets/minelittlepony/lang/en_us.lang index 0e6ae0ee..94b57348 100644 --- a/src/main/resources/assets/minelittlepony/lang/en_us.lang +++ b/src/main/resources/assets/minelittlepony/lang/en_us.lang @@ -15,3 +15,4 @@ minelp.mobs.zombies=Ponify zombies minelp.mobs.zombiepigmen=Ponify zombie pigmen minelp.mobs.skeletons=Ponify skeletons minelp.mobs.illagers=Ponify illagers +minelp.mobs.guardians=Ponify guardians diff --git a/src/main/resources/assets/minelittlepony/lang/fr_fr.lang b/src/main/resources/assets/minelittlepony/lang/fr_fr.lang index ec61b39f..dc67c545 100644 --- a/src/main/resources/assets/minelittlepony/lang/fr_fr.lang +++ b/src/main/resources/assets/minelittlepony/lang/fr_fr.lang @@ -10,10 +10,12 @@ minelp.options.hd=Activer MineLP serveur de skin minelp.options.sizes=Autoriser tous les différentes tailles de poney minelp.options.ponyarmor=Utiliser armure compatible de MineLP minelp.options.snuzzles=Afficher museau sur les poneys -minelp.options.showscale=Utiliser échelle fidèle à MLP +minelp.options.showscale=Utiliser echelle fidele a MLP minelp.mobs.title=Options de mobs minelp.mobs.villagers=Ponifier villageois minelp.mobs.zombies=Ponifier zombies -minelp.mobs.zombiepigmen=Ponifier zombie pigmen -minelp.mobs.skeletons=Ponifier squelettes \ No newline at end of file +minelp.mobs.zombiepigmen=Ponifier cochon-zombie +minelp.mobs.skeletons=Ponifier squelettes +minelp.mobs.illagers=Ponifier illagers +minelp.mobs.guardians=Ponifier gardien