Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import net.minecraft.client.Minecraft;
- public class mod_CustomGui extends BaseMod{
- private Minecraft minecraft;
- private mod_CustomGui instance;
- private ModLoader loader;
- public String getVersion(){
- return "1.2.5";
- }
- public void load(){
- loader.setInGameHook(this, true, true);
- loader.setInGUIHook(this, true, true);
- loader.registerPacketChannel(this, "CustomGui");
- }
- public void openGui(EntityPlayer player){
- loader.openGUI(player, new CustomGuiScreen(player.worldObj, minecraft, player));
- }
- public void HandlePacket(Packet250CustomPayload packet)
- {
- if (!packet.channel.equals("CustomGui")) return;
- String[] data = new String(packet.data).split(":");
- String command = data[0];
- if (command.equalsIgnoreCase("OpenGui")){
- this.openGui(minecraft.thePlayer);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment