Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package mod.brandy.client.gui;
- import net.minecraft.client.Minecraft;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.world.World;
- import net.minecraftforge.client.event.RenderGameOverlayEvent;
- import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- import net.minecraftforge.fml.common.gameevent.TickEvent;
- import net.minecraftforge.fml.common.network.IGuiHandler;
- public class BrandyGuiHandler implements IGuiHandler
- {
- public static final int calculatorGUI = 0;
- public static final int clickerGUI = 1;
- public static final int clickerCountGUI = 2;
- public static final int dclockGUI = 3;
- public static final int dclockDisplayGUI = 4;
- public static final int dcompassGUI = 5;
- public static final int dcompassDisplayGUI = 6;
- @SubscribeEvent
- public void onRenderGui(RenderGameOverlayEvent.Post event)
- {
- if (event.getType() == ElementType.ALL)
- {
- new GuiClickerCount(Minecraft.getMinecraft());
- if(GuiDClock.display == true)
- {
- new GuiDClockDisplay(Minecraft.getMinecraft());
- }
- if(GuiDCompass.display == true)
- {
- new GuiDCompassDisplay(Minecraft.getMinecraft());
- }
- }
- }
- @SubscribeEvent
- public void onPlayerTick(TickEvent.PlayerTickEvent event)
- {
- }
- @Override
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
- {
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
- {
- if (ID == calculatorGUI){
- return new GuiCalculator();
- }
- else if (ID == clickerGUI){
- return new GuiClicker();
- }
- else if (ID == clickerCountGUI){
- return new GuiClickerCount(Minecraft.getMinecraft());
- }
- else if (ID == dclockGUI){
- return new GuiDClock();
- }
- else if (ID == dclockDisplayGUI){
- return new GuiDClockDisplay(Minecraft.getMinecraft());
- }
- else if (ID == dcompassGUI){
- return new GuiDCompass();
- }
- else if (ID == dcompassDisplayGUI){
- return new GuiDCompassDisplay(Minecraft.getMinecraft());
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement