Added crash recovery and renamed ButtonValue(s) and SliderValue(s)
This commit is contained in:
@@ -21,6 +21,12 @@ import exopandora.worldhandler.util.UtilKeyBinding;
|
|||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.command.ICommand;
|
import net.minecraft.command.ICommand;
|
||||||
|
import net.minecraft.util.text.ChatType;
|
||||||
|
import net.minecraft.util.text.Style;
|
||||||
|
import net.minecraft.util.text.TextComponentString;
|
||||||
|
import net.minecraft.util.text.TextComponentTranslation;
|
||||||
|
import net.minecraft.util.text.event.ClickEvent;
|
||||||
|
import net.minecraft.util.text.event.ClickEvent.Action;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
@@ -168,4 +174,22 @@ public class WorldHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void throwError(Exception exception)
|
||||||
|
{
|
||||||
|
if(!Minecraft.getMinecraft().inGameHasFocus)
|
||||||
|
{
|
||||||
|
Minecraft.getMinecraft().displayGuiScreen(null);
|
||||||
|
Minecraft.getMinecraft().setIngameFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
TextComponentString name = new TextComponentString(Main.NAME);
|
||||||
|
name.setStyle(new Style().setUnderlined(true).setClickEvent(new ClickEvent(Action.OPEN_URL, "$url")));
|
||||||
|
|
||||||
|
TextComponentTranslation message = new TextComponentTranslation("worldhandler.error.gui", name);
|
||||||
|
message.setStyle(new Style().setColor(net.minecraft.util.text.TextFormatting.RED));
|
||||||
|
|
||||||
|
Minecraft.getMinecraft().ingameGUI.addChatMessage(ChatType.SYSTEM, message);
|
||||||
|
exception.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,7 @@ import net.minecraft.client.renderer.RenderGlobal;
|
|||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.util.text.ChatType;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentString;
|
||||||
import net.minecraftforge.client.event.ClientChatEvent;
|
import net.minecraftforge.client.event.ClientChatEvent;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
@@ -142,10 +143,12 @@ public class EventListener
|
|||||||
{
|
{
|
||||||
if(!UtilPlayer.canIssueCommand() && ConfigSettings.isPermissionQueryEnabled())
|
if(!UtilPlayer.canIssueCommand() && ConfigSettings.isPermissionQueryEnabled())
|
||||||
{
|
{
|
||||||
Minecraft.getMinecraft().player.sendMessage(new TextComponentString(ChatFormatting.RED + I18n.format("worldhandler.permission.refused")));
|
Minecraft.getMinecraft().ingameGUI.addChatMessage(ChatType.GAME_INFO, new TextComponentString(ChatFormatting.RED + I18n.format("worldhandler.permission.refused")));
|
||||||
Minecraft.getMinecraft().player.sendMessage(new TextComponentString(ChatFormatting.RED + I18n.format("worldhandler.permission.refused.change", I18n.format("gui.worldhandler.config.key.settings.permission_query"))));
|
Minecraft.getMinecraft().ingameGUI.addChatMessage(ChatType.GAME_INFO, new TextComponentString(ChatFormatting.RED + I18n.format("worldhandler.permission.refused.change", I18n.format("gui.worldhandler.config.key.settings.permission_query"))));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if(BlockHelper.isFocusedBlockEqualTo(Blocks.STANDING_SIGN) || BlockHelper.isFocusedBlockEqualTo(Blocks.WALL_SIGN))
|
if(BlockHelper.isFocusedBlockEqualTo(Blocks.STANDING_SIGN) || BlockHelper.isFocusedBlockEqualTo(Blocks.WALL_SIGN))
|
||||||
{
|
{
|
||||||
@@ -160,5 +163,10 @@ public class EventListener
|
|||||||
Minecraft.getMinecraft().displayGuiScreen(new GuiWorldHandlerContainer(Contents.MAIN));
|
Minecraft.getMinecraft().displayGuiScreen(new GuiWorldHandlerContainer(Contents.MAIN));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package exopandora.worldhandler.gui.button;
|
|||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import exopandora.worldhandler.Main;
|
import exopandora.worldhandler.Main;
|
||||||
|
import exopandora.worldhandler.WorldHandler;
|
||||||
import exopandora.worldhandler.config.ConfigSkin;
|
import exopandora.worldhandler.config.ConfigSkin;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
@@ -148,8 +149,16 @@ public class GuiButtonKeyboard extends GuiButtonWorldHandler
|
|||||||
if(mousePressed(minecraft, mouseX, mouseY) && Mouse.isButtonDown(0))
|
if(mousePressed(minecraft, mouseX, mouseY) && Mouse.isButtonDown(0))
|
||||||
{
|
{
|
||||||
this.playPressSound(minecraft.getSoundHandler());
|
this.playPressSound(minecraft.getSoundHandler());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
this.content.actionPerformed(this.container, this);
|
this.content.actionPerformed(this.container, this);
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.lastMousePressed = mousePressed(minecraft, mouseX, mouseY);
|
this.lastMousePressed = mousePressed(minecraft, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.mojang.realmsclient.gui.ChatFormatting;
|
|||||||
|
|
||||||
import exopandora.worldhandler.format.TextFormatting;
|
import exopandora.worldhandler.format.TextFormatting;
|
||||||
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -18,7 +18,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||||||
public class GuiButtonList<T> extends GuiButtonWorldHandler
|
public class GuiButtonList<T> extends GuiButtonWorldHandler
|
||||||
{
|
{
|
||||||
private final IListButtonLogic<T> logic;
|
private final IListButtonLogic<T> logic;
|
||||||
private final ButtonValues<T> persistence;
|
private final ButtonValue<T> persistence;
|
||||||
private int mouseX;
|
private int mouseX;
|
||||||
private int mouseY;
|
private int mouseY;
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package exopandora.worldhandler.gui.button;
|
|||||||
|
|
||||||
import exopandora.worldhandler.config.ConfigSkin;
|
import exopandora.worldhandler.config.ConfigSkin;
|
||||||
import exopandora.worldhandler.gui.button.logic.ISliderResponder;
|
import exopandora.worldhandler.gui.button.logic.ISliderResponder;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.button.persistence.SliderValues;
|
import exopandora.worldhandler.gui.button.persistence.SliderValue;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
import exopandora.worldhandler.helper.ResourceHelper;
|
import exopandora.worldhandler.helper.ResourceHelper;
|
||||||
@@ -25,7 +25,7 @@ public class GuiSlider<T> extends GuiButton
|
|||||||
private final String name;
|
private final String name;
|
||||||
private final ISliderResponder responder;
|
private final ISliderResponder responder;
|
||||||
private final Container frame;
|
private final Container frame;
|
||||||
private final ButtonValues<SliderValues> persistence;
|
private final ButtonValue<SliderValue> persistence;
|
||||||
|
|
||||||
public GuiSlider(Content content, Container frame, Object key, int x, int y, int width, int height, String name, double min, double max, double start, ISliderResponder responder)
|
public GuiSlider(Content content, Container frame, Object key, int x, int y, int width, int height, String name, double min, double max, double start, ISliderResponder responder)
|
||||||
{
|
{
|
||||||
@@ -45,16 +45,16 @@ public class GuiSlider<T> extends GuiButton
|
|||||||
{
|
{
|
||||||
if(min == max)
|
if(min == max)
|
||||||
{
|
{
|
||||||
this.persistence.setObject(new SliderValues(min, max, 0.0D));
|
this.persistence.setObject(new SliderValue(min, max, 0.0D));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.persistence.setObject(new SliderValues(min, max, (start - min) / (max - min)));
|
this.persistence.setObject(new SliderValue(min, max, (start - min) / (max - min)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(this.persistence.getObject().getMin() != min || this.persistence.getObject().getMax() != max)
|
else if(this.persistence.getObject().getMin() != min || this.persistence.getObject().getMax() != max)
|
||||||
{
|
{
|
||||||
this.persistence.setObject(new SliderValues(min, max, (int) MathHelper.clamp(this.getValue(), min, max)));
|
this.persistence.setObject(new SliderValue(min, max, (int) MathHelper.clamp(this.getValue(), min, max)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.Arrays;
|
|||||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||||
|
|
||||||
import exopandora.worldhandler.format.EnumColor;
|
import exopandora.worldhandler.format.EnumColor;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
@@ -26,13 +26,13 @@ public abstract class ColorListButtonLogic implements IListButtonLogic<Integer>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTooltipString(ButtonValues<Integer> values)
|
public String getTooltipString(ButtonValue<Integer> values)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayString(ButtonValues values)
|
public String getDisplayString(ButtonValue values)
|
||||||
{
|
{
|
||||||
EnumColor color = EnumColor.getColorFromId(values.getIndex());
|
EnumColor color = EnumColor.getColorFromId(values.getIndex());
|
||||||
return color + I18n.format("gui.worldhandler.color") + ": " + I18n.format("gui.worldhandler.color." + color.getFormat());
|
return color + I18n.format("gui.worldhandler.color") + ": " + I18n.format("gui.worldhandler.color." + color.getFormat());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package exopandora.worldhandler.gui.button.logic;
|
package exopandora.worldhandler.gui.button.logic;
|
||||||
|
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
@@ -9,15 +9,15 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public interface IListButtonLogic<T>
|
public interface IListButtonLogic<T>
|
||||||
{
|
{
|
||||||
void actionPerformed(Container container, GuiButton button, ButtonValues<T> values);
|
void actionPerformed(Container container, GuiButton button, ButtonValue<T> values);
|
||||||
|
|
||||||
int getMax();
|
int getMax();
|
||||||
|
|
||||||
T getObject(int index);
|
T getObject(int index);
|
||||||
|
|
||||||
String getDisplayString(ButtonValues<T> values);
|
String getDisplayString(ButtonValue<T> values);
|
||||||
|
|
||||||
default String getTooltipString(ButtonValues<T> values)
|
default String getTooltipString(ButtonValue<T> values)
|
||||||
{
|
{
|
||||||
if(values != null && values.getObject() != null)
|
if(values != null && values.getObject() != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class ButtonValues<T>
|
public class ButtonValue<T>
|
||||||
{
|
{
|
||||||
private int index;
|
private int index;
|
||||||
private T object;
|
private T object;
|
||||||
|
|||||||
@@ -3,27 +3,26 @@ package exopandora.worldhandler.gui.button.persistence;
|
|||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class SliderValues
|
public class SliderValue
|
||||||
{
|
{
|
||||||
private final double min;
|
private final double min;
|
||||||
private final double max;
|
private final double max;
|
||||||
private double position;
|
private double position;
|
||||||
|
|
||||||
private SliderValues(double min, double max)
|
private SliderValue(double min, double max)
|
||||||
{
|
{
|
||||||
this.min = min;
|
this.min = min;
|
||||||
this.max = max;
|
this.max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SliderValues(double min, double max, double position)
|
public SliderValue(double min, double max, double position)
|
||||||
{
|
{
|
||||||
this(min, max);
|
this(min, max);
|
||||||
this.position = position;
|
this.position = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SliderValues(double min, double max, int value)
|
public SliderValue(double min, double max, int value)
|
||||||
{
|
{
|
||||||
this(min, max);
|
this(min, max);
|
||||||
this.position = this.valueToPosition(value);
|
this.position = this.valueToPosition(value);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
|
|||||||
import exopandora.worldhandler.Main;
|
import exopandora.worldhandler.Main;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
import exopandora.worldhandler.gui.content.Contents;
|
import exopandora.worldhandler.gui.content.Contents;
|
||||||
|
import exopandora.worldhandler.gui.content.impl.ContentPlaysound;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.registry.RegistryNamespaced;
|
import net.minecraft.util.registry.RegistryNamespaced;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
@@ -61,7 +62,7 @@ public class Category
|
|||||||
public static void registerCategories()
|
public static void registerCategories()
|
||||||
{
|
{
|
||||||
registerCategory(0, "main", new Category(Contents.MAIN, Contents.CONTAINERS, Contents.MULTIPLAYER));
|
registerCategory(0, "main", new Category(Contents.MAIN, Contents.CONTAINERS, Contents.MULTIPLAYER));
|
||||||
registerCategory(1, "entities", new Category(Contents.SUMMON));
|
registerCategory(1, "entities", new Category(Contents.SUMMON, new ContentPlaysound()));
|
||||||
registerCategory(2, "items", new Category(Contents.CUSTOM_ITEM, Contents.ENCHANTMENT, Contents.RECIPES));
|
registerCategory(2, "items", new Category(Contents.CUSTOM_ITEM, Contents.ENCHANTMENT, Contents.RECIPES));
|
||||||
registerCategory(3, "blocks", new Category(Contents.EDIT_BLOCKS, Contents.SIGN_EDITOR, Contents.NOTE_EDITOR));
|
registerCategory(3, "blocks", new Category(Contents.EDIT_BLOCKS, Contents.SIGN_EDITOR, Contents.NOTE_EDITOR));
|
||||||
registerCategory(4, "world", new Category(Contents.WORLD_INFO, Contents.GAMERULES));
|
registerCategory(4, "world", new Category(Contents.WORLD_INFO, Contents.GAMERULES));
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
|
|
||||||
private static final BuilderWorldHandler BUILDER_WORLD_HANDLER = new BuilderWorldHandler();
|
private static final BuilderWorldHandler BUILDER_WORLD_HANDLER = new BuilderWorldHandler();
|
||||||
|
|
||||||
public GuiWorldHandlerContainer(Content content)
|
public GuiWorldHandlerContainer(Content content) throws Exception
|
||||||
{
|
{
|
||||||
this.content = content;
|
this.content = content;
|
||||||
this.tabSize = this.content.getCategory().getSize();
|
this.tabSize = this.content.getCategory().getSize();
|
||||||
@@ -80,6 +80,8 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui()
|
public void initGui()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
this.finalButtons.clear();
|
this.finalButtons.clear();
|
||||||
this.elements.clear();
|
this.elements.clear();
|
||||||
@@ -151,6 +153,11 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
|
|
||||||
this.initButtons();
|
this.initButtons();
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void initButtons()
|
public void initButtons()
|
||||||
{
|
{
|
||||||
@@ -191,10 +198,17 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateScreen()
|
public void updateScreen()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
this.content.updateScreen(this);
|
this.content.updateScreen(this);
|
||||||
this.updateSyntax();
|
this.updateSyntax();
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private int getBackgroundX()
|
private int getBackgroundX()
|
||||||
{
|
{
|
||||||
@@ -269,6 +283,8 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException
|
protected void actionPerformed(GuiButton button) throws IOException
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
buttons:
|
buttons:
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
@@ -346,6 +362,11 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void defaultColor()
|
private void defaultColor()
|
||||||
{
|
{
|
||||||
@@ -398,6 +419,8 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
final int backgroundX = this.getBackgroundX();
|
final int backgroundX = this.getBackgroundX();
|
||||||
final int backgroundY = this.getBackgroundY();
|
final int backgroundY = this.getBackgroundY();
|
||||||
@@ -657,9 +680,16 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
GuiUtils.drawHoveringText(Arrays.asList(label), versionWidth - 12, versionHeight + 12, this.width + this.fontRenderer.getStringWidth(label), this.height + 10, this.width, this.fontRenderer);
|
GuiUtils.drawHoveringText(Arrays.asList(label), versionWidth - 12, versionHeight + 12, this.width + this.fontRenderer.getStringWidth(label), this.height + 10, this.width, this.fontRenderer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void keyTyped(char charTyped, int keyCode) throws IOException
|
protected void keyTyped(char charTyped, int keyCode) throws IOException
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
super.keyTyped(charTyped, keyCode);
|
super.keyTyped(charTyped, keyCode);
|
||||||
|
|
||||||
@@ -682,9 +712,16 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
element.keyTyped(this, charTyped, keyCode);
|
element.keyTyped(this, charTyped, keyCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
|
||||||
@@ -706,12 +743,24 @@ public class GuiWorldHandlerContainer extends Container
|
|||||||
element.mouseClicked(mouseX, mouseY, mouseButton);
|
element.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGuiClosed()
|
public void onGuiClosed()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
this.content.onGuiClosed();
|
this.content.onGuiClosed();
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
WorldHandler.throwError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean doesGuiPauseGame()
|
public boolean doesGuiPauseGame()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import exopandora.worldhandler.Main;
|
import exopandora.worldhandler.Main;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.content.impl.ContentAdvancements;
|
import exopandora.worldhandler.gui.content.impl.ContentAdvancements;
|
||||||
import exopandora.worldhandler.gui.content.impl.ContentButcher;
|
import exopandora.worldhandler.gui.content.impl.ContentButcher;
|
||||||
import exopandora.worldhandler.gui.content.impl.ContentChangeWorld;
|
import exopandora.worldhandler.gui.content.impl.ContentChangeWorld;
|
||||||
@@ -91,13 +91,13 @@ public abstract class Content implements IContent
|
|||||||
REGISTRY.register(id, textualID, content);
|
REGISTRY.register(id, textualID, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<Object, ButtonValues> persistence;
|
private Map<Object, ButtonValue> persistence;
|
||||||
|
|
||||||
public <T> ButtonValues<T> getPersistence(Object id)
|
public <T> ButtonValue<T> getPersistence(Object id)
|
||||||
{
|
{
|
||||||
if(this.persistence == null)
|
if(this.persistence == null)
|
||||||
{
|
{
|
||||||
this.persistence = new HashMap<Object, ButtonValues>();
|
this.persistence = new HashMap<Object, ButtonValue>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.persistence.containsKey(id))
|
if(this.persistence.containsKey(id))
|
||||||
@@ -105,7 +105,7 @@ public abstract class Content implements IContent
|
|||||||
return this.persistence.get(id);
|
return this.persistence.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonValues<T> values = new ButtonValues<T>();
|
ButtonValue<T> values = new ButtonValue<T>();
|
||||||
|
|
||||||
this.persistence.put(id, values);
|
this.persistence.put(id, values);
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public interface IContent
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default void actionPerformed(Container container, GuiButton button)
|
default void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import exopandora.worldhandler.gui.button.EnumTooltip;
|
|||||||
import exopandora.worldhandler.gui.button.GuiButtonList;
|
import exopandora.worldhandler.gui.button.GuiButtonList;
|
||||||
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
||||||
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
import exopandora.worldhandler.gui.content.element.Element;
|
import exopandora.worldhandler.gui.content.element.Element;
|
||||||
@@ -59,7 +59,7 @@ public class ElementClickList extends Element
|
|||||||
container.add(this.button = new GuiButtonList(this.getButtonId(), this.x, this.y, 114, 20, EnumTooltip.TOP_RIGHT, this.content, new IListButtonLogic<Node>()
|
container.add(this.button = new GuiButtonList(this.getButtonId(), this.x, this.y, 114, 20, EnumTooltip.TOP_RIGHT, this.content, new IListButtonLogic<Node>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button, ButtonValues<Node> values)
|
public void actionPerformed(Container container, GuiButton button, ButtonValue<Node> values)
|
||||||
{
|
{
|
||||||
content.getPersistence(logic.getId() + (depth + 1)).setIndex(0);
|
content.getPersistence(logic.getId() + (depth + 1)).setIndex(0);
|
||||||
container.initButtons();
|
container.initButtons();
|
||||||
@@ -78,13 +78,13 @@ public class ElementClickList extends Element
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayString(ButtonValues<Node> values)
|
public String getDisplayString(ButtonValue<Node> values)
|
||||||
{
|
{
|
||||||
return logic.translate(getKeys());
|
return logic.translate(getKeys());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTooltipString(ButtonValues<Node> values)
|
public String getTooltipString(ButtonValue<Node> values)
|
||||||
{
|
{
|
||||||
if(values != null && values.getObject() != null)
|
if(values != null && values.getObject() != null)
|
||||||
{
|
{
|
||||||
@@ -118,7 +118,7 @@ public class ElementClickList extends Element
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private ButtonValues<Node> getValues()
|
private ButtonValue<Node> getValues()
|
||||||
{
|
{
|
||||||
if(this.button != null)
|
if(this.button != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import exopandora.worldhandler.gui.button.GuiButtonList;
|
|||||||
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
||||||
import exopandora.worldhandler.gui.button.GuiTextFieldTooltip;
|
import exopandora.worldhandler.gui.button.GuiTextFieldTooltip;
|
||||||
import exopandora.worldhandler.gui.button.logic.ColorListButtonLogic;
|
import exopandora.worldhandler.gui.button.logic.ColorListButtonLogic;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
import exopandora.worldhandler.gui.content.element.Element;
|
import exopandora.worldhandler.gui.content.element.Element;
|
||||||
@@ -59,7 +59,7 @@ public class ElementColorMenu extends Element
|
|||||||
container.add(this.colorList = new GuiButtonList(this.ids[0], this.x + 118, this.y + 24, 114, 20, this.content, new ColorListButtonLogic()
|
container.add(this.colorList = new GuiButtonList(this.ids[0], this.x + 118, this.y + 24, 114, 20, this.content, new ColorListButtonLogic()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button, ButtonValues<Integer> values)
|
public void actionPerformed(Container container, GuiButton button, ButtonValue<Integer> values)
|
||||||
{
|
{
|
||||||
string.setColor(values.getIndex());
|
string.setColor(values.getIndex());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.List;
|
|||||||
import exopandora.worldhandler.config.ConfigSkin;
|
import exopandora.worldhandler.config.ConfigSkin;
|
||||||
import exopandora.worldhandler.format.TextFormatting;
|
import exopandora.worldhandler.format.TextFormatting;
|
||||||
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
import exopandora.worldhandler.gui.content.Content;
|
import exopandora.worldhandler.gui.content.Content;
|
||||||
import exopandora.worldhandler.gui.content.element.Element;
|
import exopandora.worldhandler.gui.content.element.Element;
|
||||||
@@ -25,7 +25,7 @@ public class ElementPageList<T, K> extends Element
|
|||||||
private final int width;
|
private final int width;
|
||||||
private final int height;
|
private final int height;
|
||||||
private final int[] ids;
|
private final int[] ids;
|
||||||
private final ButtonValues<Integer> values;
|
private final ButtonValue<Integer> values;
|
||||||
|
|
||||||
public ElementPageList(int x, int y, List<T> list, K initial, int width, int height, int length, Content content, int[] ids, ILogicPageList<T, K> logic)
|
public ElementPageList(int x, int y, List<T> list, K initial, int width, int height, int length, Content content, int[] ids, ILogicPageList<T, K> logic)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import exopandora.worldhandler.gui.button.EnumTooltip;
|
|||||||
import exopandora.worldhandler.gui.button.GuiButtonList;
|
import exopandora.worldhandler.gui.button.GuiButtonList;
|
||||||
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
||||||
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.category.Categories;
|
import exopandora.worldhandler.gui.category.Categories;
|
||||||
import exopandora.worldhandler.gui.category.Category;
|
import exopandora.worldhandler.gui.category.Category;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
@@ -109,7 +109,7 @@ public class ContentAdvancements extends Content
|
|||||||
private final EnumMode[] values = Arrays.stream(EnumMode.values()).filter(mode -> !mode.equals(EnumMode.EVERYTHING)).toArray(EnumMode[]::new);
|
private final EnumMode[] values = Arrays.stream(EnumMode.values()).filter(mode -> !mode.equals(EnumMode.EVERYTHING)).toArray(EnumMode[]::new);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button, ButtonValues<EnumMode> values)
|
public void actionPerformed(Container container, GuiButton button, ButtonValue<EnumMode> values)
|
||||||
{
|
{
|
||||||
builderAdvancement.setMode(values.getObject());
|
builderAdvancement.setMode(values.getObject());
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public class ContentAdvancements extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayString(ButtonValues<EnumMode> values)
|
public String getDisplayString(ButtonValue<EnumMode> values)
|
||||||
{
|
{
|
||||||
return I18n.format("gui.worldhandler.advancements." + values.getObject().toString());
|
return I18n.format("gui.worldhandler.advancements." + values.getObject().toString());
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ public class ContentAdvancements extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class ContentButcher extends ContentChild
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class ContentChangeWorld extends ContentChild
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class ContentContainers extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class ContentContinue extends ContentChild
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ public class ContentCustomItem extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import exopandora.worldhandler.gui.button.GuiButtonList;
|
|||||||
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
import exopandora.worldhandler.gui.button.GuiButtonWorldHandler;
|
||||||
import exopandora.worldhandler.gui.button.GuiTextFieldTooltip;
|
import exopandora.worldhandler.gui.button.GuiTextFieldTooltip;
|
||||||
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
import exopandora.worldhandler.gui.button.logic.IListButtonLogic;
|
||||||
import exopandora.worldhandler.gui.button.persistence.ButtonValues;
|
import exopandora.worldhandler.gui.button.persistence.ButtonValue;
|
||||||
import exopandora.worldhandler.gui.category.Categories;
|
import exopandora.worldhandler.gui.category.Categories;
|
||||||
import exopandora.worldhandler.gui.category.Category;
|
import exopandora.worldhandler.gui.category.Category;
|
||||||
import exopandora.worldhandler.gui.container.Container;
|
import exopandora.worldhandler.gui.container.Container;
|
||||||
@@ -178,7 +178,7 @@ public class ContentEditBlocks extends Content
|
|||||||
container.add(this.cloneButton = new GuiButtonList(9, x + 118, y, 114, 20, EnumTooltip.TOP_RIGHT, this, new IListButtonLogic<EnumMask>()
|
container.add(this.cloneButton = new GuiButtonList(9, x + 118, y, 114, 20, EnumTooltip.TOP_RIGHT, this, new IListButtonLogic<EnumMask>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button, ButtonValues<EnumMask> values)
|
public void actionPerformed(Container container, GuiButton button, ButtonValue<EnumMask> values)
|
||||||
{
|
{
|
||||||
builderClone.setMask(values.getObject());
|
builderClone.setMask(values.getObject());
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ public class ContentEditBlocks extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayString(ButtonValues<EnumMask> values)
|
public String getDisplayString(ButtonValue<EnumMask> values)
|
||||||
{
|
{
|
||||||
return I18n.format("gui.worldhandler.edit_blocks.clone.mode." + values.getObject().toString());
|
return I18n.format("gui.worldhandler.edit_blocks.clone.mode." + values.getObject().toString());
|
||||||
}
|
}
|
||||||
@@ -216,7 +216,7 @@ public class ContentEditBlocks extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class ContentEnchantment extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class ContentExperience extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public class ContentGamerules extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class ContentMain extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class ContentMultiplayer extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class ContentNoteEditor extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class ContentPlayer extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class ContentPotions extends ContentChild
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
Potion potion = this.builderPotion.getEffectAsPotion();
|
Potion potion = this.builderPotion.getEffectAsPotion();
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class ContentRecipes extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class ContentScoreboardObjectives extends ContentScoreboard
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public class ContentScoreboardPlayers extends ContentScoreboard
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class ContentScoreboardTeams extends ContentScoreboard
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class ContentSignEditor extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ public class ContentSummon extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class ContentWorldInfo extends Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(Container container, GuiButton button)
|
public void actionPerformed(Container container, GuiButton button) throws Exception
|
||||||
{
|
{
|
||||||
switch(button.id)
|
switch(button.id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -449,3 +449,5 @@ gui.worldhandler.color.reset=Normal
|
|||||||
|
|
||||||
worldhandler.permission.refused=Du hast nicht die benötigte Berechtigung, um den World Handler zu benutzen
|
worldhandler.permission.refused=Du hast nicht die benötigte Berechtigung, um den World Handler zu benutzen
|
||||||
worldhandler.permission.refused.change=Ändere "%s" um diese Nachricht zu umgehen
|
worldhandler.permission.refused.change=Ändere "%s" um diese Nachricht zu umgehen
|
||||||
|
|
||||||
|
worldhandler.error.gui=Ein unerwarteter Fehler ist aufgetreten. Bitte sende einen Unfallbericht mit deinen Protokolldateien an das %s Forum
|
||||||
@@ -449,3 +449,5 @@ gui.worldhandler.color.reset=Default
|
|||||||
|
|
||||||
worldhandler.permission.refused=You do not have permission to use the World Handler
|
worldhandler.permission.refused=You do not have permission to use the World Handler
|
||||||
worldhandler.permission.refused.change=Change "%s" to disable this message
|
worldhandler.permission.refused.change=Change "%s" to disable this message
|
||||||
|
|
||||||
|
worldhandler.error.gui=An unexpected error occured. Please send a crash report with your log files to the %s forum
|
||||||
@@ -449,3 +449,5 @@ gui.worldhandler.color.reset=默认
|
|||||||
|
|
||||||
worldhandler.permission.refused=您没有权限使用 World Handler
|
worldhandler.permission.refused=您没有权限使用 World Handler
|
||||||
worldhandler.permission.refused.change=更改 "%s" 来停止显示这条信息
|
worldhandler.permission.refused.change=更改 "%s" 来停止显示这条信息
|
||||||
|
|
||||||
|
worldhandler.error.gui=An unexpected error occured. Please send a crash report with your log files to the %s forum
|
||||||
Reference in New Issue
Block a user