Added SideOnly annotations for the Guis to fix issues on servers

This commit is contained in:
Adubbz 2014-01-19 22:17:11 +11:00
parent 3d6ba54fab
commit 37a924d61c
2 changed files with 6 additions and 0 deletions

View file

@ -5,12 +5,15 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.GuiOpenEvent;
import biomesoplenty.common.helpers.BOPReflectionHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class MainMenuEventHandler
{
public static ResourceLocation[] bopTitlePanoramaPaths = new ResourceLocation[] {new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_0.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_1.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_2.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_3.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_4.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_5.png")};
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void openMainMenu(GuiOpenEvent event)
{
if (event.gui instanceof GuiMainMenu)

View file

@ -11,12 +11,15 @@ import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.common.MinecraftForge;
import biomesoplenty.client.gui.StartupWarningGUI;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class StartupWarningEventHandler
{
public static StartupWarningEventHandler instance = new StartupWarningEventHandler();
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void openMainMenu(GuiOpenEvent event)
{
if (event.gui instanceof GuiMainMenu)