Package net.minecraft.server.v1_7_R4

Examples of net.minecraft.server.v1_7_R4.PacketPlayOutUpdateHealth


        }
        return healthPacket;
    }

    public static void showHealth(Player player, float health, int food, float food_saturation) {
        PacketPlayOutUpdateHealth healthPacket = getHealthPacket(health, food, food_saturation);
        PacketHelper.sendPacket(player, healthPacket);
    }
View Full Code Here


        PacketPlayOutExperience experiencePacket = getExperiencePacket(player.getExp(), player.getLevel());
        PacketHelper.sendPacket(player, experiencePacket);
    }

    public static void resetHealth(Player player) {
        PacketPlayOutUpdateHealth healthPacket = getHealthPacket((float) player.getHealth(),
                player.getFoodLevel(), player.getSaturation());
        PacketHelper.sendPacket(player, healthPacket);
    }
View Full Code Here

    }

    public org.bukkit.inventory.PlayerInventory getInventory() {
        if (InventoryScriptHelper.offlineInventories.containsKey(getUniqueId()))
            return InventoryScriptHelper.offlineInventories.get(getUniqueId());
        PlayerInventory inventory = new PlayerInventory(null);
        inventory.b(this.compound.getList("Inventory", 10));
        org.bukkit.inventory.PlayerInventory inv = new CraftInventoryPlayer(inventory);
        InventoryScriptHelper.offlineInventories.put(getUniqueId(), inv);
        return inv;
    }
View Full Code Here

        InventoryScriptHelper.offlineInventories.put(getUniqueId(), inv);
        return inv;
    }

    public void setInventory(org.bukkit.inventory.Inventory inventory) {
        CraftInventoryPlayer inv = new CraftInventoryPlayer(new PlayerInventory(null));
        inv.setContents(inventory.getContents());
        this.compound.set("Inventory", inv.getInventory().a(new NBTTagList()));
        if(this.autosave) savePlayerData();
    }
View Full Code Here

    // canSpawnStructureAtCoords
    @Override
    protected boolean a(int chunkX, int chunkZ)
    {
        Random rand = b;
        World worldMC = c;
        if (rand.nextInt(80) < Math.max(Math.abs(chunkX), Math.abs(chunkZ)))
        {
            LocalWorld world = WorldHelper.toLocalWorld(worldMC);
            LocalBiome biome = world.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8);
            if (rand.nextDouble() * 100.0 < biome.getBiomeConfig().mineshaftsRarity)
View Full Code Here

    }

    @Override
    protected StructureStart b(int i, int j)
    {
        return new WorldGenMineshaftStart(this.c, this.b, i, j);
    }
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_7_R4.PacketPlayOutUpdateHealth

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.