Package crazypants.enderio.xp

Examples of crazypants.enderio.xp.PacketDrainPlayerXP


  protected void actionPerformed(GuiButton b) {   
    super.actionPerformed(b);
    if(b.id == PLAYER_XP_ID) {
      int xp = XpUtil.getPlayerXP(Minecraft.getMinecraft().thePlayer);
      if(xp > 0 || Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) {
        PacketHandler.INSTANCE.sendToServer(new PacketDrainPlayerXP(tileEntity, tileEntity.getCurrentlyRequiredLevel(), true));
        SoundUtil.playClientSoundFX("random.orb", tileEntity);       
      }
    }
  }
View Full Code Here


     
      EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
      int currLevel = player.experienceLevel;   
      int targetLevel = Math.max(0, currLevel + levels);
     
      PacketDrainPlayerXP packet = new PacketDrainPlayerXP(te, targetLevel, false);
      PacketHandler.INSTANCE.sendToServer(packet);
    } else {
     
      PacketGivePlayerXP packet = new PacketGivePlayerXP(te, levels);
      PacketHandler.INSTANCE.sendToServer(packet);
View Full Code Here

TOP

Related Classes of crazypants.enderio.xp.PacketDrainPlayerXP

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.