Package com.pahimar.ee3.network.message

Examples of com.pahimar.ee3.network.message.MessageSetEnergyValue


        drawGlyphInWorld(event);
    }

    private static void drawGlyphInWorld(DrawBlockHighlightEvent event)
    {
        ChalkSettings chalkSettings = EquivalentExchange3.proxy.getClientProxy().chalkSettings;
        ResourceLocation texture = GlyphTextureRegistry.getInstance().getRegisteredGlyphAt(chalkSettings.getIndex());
        int rotation = chalkSettings.getRotation();

        double x = event.target.blockX + 0.5F;
        double y = event.target.blockY + 0.5F;
        double z = event.target.blockZ + 0.5F;
        double iPX = event.player.prevPosX + (event.player.posX - event.player.prevPosX) * event.partialTicks;
        double iPY = event.player.prevPosY + (event.player.posY - event.player.prevPosY) * event.partialTicks;
        double iPZ = event.player.prevPosZ + (event.player.posZ - event.player.prevPosZ) * event.partialTicks;

        float xScale, yScale, zScale;
        float xShift, yShift, zShift;
        float xRotate, yRotate, zRotate;
        int zCorrection = 1;
        int rotationAngle = 0;
        int playerFacing = MathHelper.floor_double(event.player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
        int facingCorrectionAngle = 0;

        xScale = yScale = zScale = 1;
        xShift = yShift = zShift = 0;
        xRotate = yRotate = zRotate = 0;

        int chargeLevel = chalkSettings.getSize();
        ForgeDirection sideHit = ForgeDirection.getOrientation(event.target.sideHit);
        TileEntity tileEntity = event.player.worldObj.getTileEntity(event.target.blockX, event.target.blockY, event.target.blockZ);
        boolean shouldRender = true;

        if (tileEntity instanceof TileEntityEE)
View Full Code Here


    @SubscribeEvent
    public void syncChalkSettingsOnLogin(cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent event)
    {
        NBTTagCompound playerCustomData = EntityHelper.getCustomEntityData(event.player);
        ChalkSettings chalkSettings = new ChalkSettings();
        chalkSettings.readFromNBT(playerCustomData);

        PacketHandler.INSTANCE.sendTo(new MessageChalkSettings(chalkSettings), (EntityPlayerMP) event.player);
    }
View Full Code Here

        if (event.player != null)
        {
            NBTTagCompound playerCustomData = EntityHelper.getCustomEntityData(event.player);

            // Chalk Settings
            ChalkSettings chalkSettings = new ChalkSettings();
            chalkSettings.readFromNBT(playerCustomData);
            chalkSettings.writeToNBT(playerCustomData);

            EntityHelper.saveCustomEntityData(event.player, playerCustomData);
        }
    }
View Full Code Here

    private void learnItemStack()
    {
        if (this.canLearnItemStack())
        {
            PlayerKnowledge playerKnowledge = PlayerKnowledge.readPlayerKnowledgeFromNBT(this.inventory[TOME_SLOT_INVENTORY_INDEX].getTagCompound());
            playerKnowledge.learnItemStack(this.inventory[ITEM_SLOT_INVENTORY_INDEX]);
            playerKnowledge.writeToNBT(this.inventory[TOME_SLOT_INVENTORY_INDEX].getTagCompound());

            this.inventory[ITEM_SLOT_INVENTORY_INDEX].stackSize--;

            if (this.inventory[ITEM_SLOT_INVENTORY_INDEX].stackSize <= 0)
            {
View Full Code Here

    {
        if (itemStack.getItem() instanceof ItemAlchemicalTome)
        {
            if (itemStack.hasTagCompound() && NBTHelper.hasTag(itemStack, Names.NBT.KNOWLEDGE))
            {
                PlayerKnowledge playerKnowledge = new PlayerKnowledge();
                playerKnowledge.readFromNBT(itemStack.getTagCompound());
                return playerKnowledge;
            }
            else
            {
                PlayerKnowledge playerKnowledge = new PlayerKnowledge();
                writePlayerKnowledge(itemStack, playerKnowledge);
                return playerKnowledge;
            }
        }
View Full Code Here

    @Override
    public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
    {
        if (tileEntity instanceof TileEntityAlchemicalChest)
        {
            TileEntityAlchemicalChest tileEntityAlchemicalChest = (TileEntityAlchemicalChest) tileEntity;
            ForgeDirection direction = null;

            if (tileEntityAlchemicalChest.getWorldObj() != null)
            {
                direction = tileEntityAlchemicalChest.getOrientation();
            }

            if (tileEntityAlchemicalChest.getState() == 0)
            {
                this.bindTexture(Textures.Model.ALCHEMICAL_CHEST_SMALL);
            }
            else if (tileEntityAlchemicalChest.getState() == 1)
            {
                this.bindTexture(Textures.Model.ALCHEMICAL_CHEST_MEDIUM);
            }
            else if (tileEntityAlchemicalChest.getState() == 2)
            {
                this.bindTexture(Textures.Model.ALCHEMICAL_CHEST_LARGE);
            }

            GL11.glPushMatrix();
View Full Code Here

        {
            return new TileEntityAlchemicalChestMedium();
        }
        else if (metaData == 2)
        {
            return new TileEntityAlchemicalChestLarge();
        }

        return null;
    }
View Full Code Here

        {
            return new TileEntityAlchemicalChestSmall();
        }
        else if (metaData == 1)
        {
            return new TileEntityAlchemicalChestMedium();
        }
        else if (metaData == 2)
        {
            return new TileEntityAlchemicalChestLarge();
        }
View Full Code Here

    @Override
    public TileEntity createNewTileEntity(World world, int metaData)
    {
        if (metaData == 0)
        {
            return new TileEntityAlchemicalChestSmall();
        }
        else if (metaData == 1)
        {
            return new TileEntityAlchemicalChestMedium();
        }
View Full Code Here

    @Override
    public IMessage onMessage(MessageTileEntityAlchemyArray message, MessageContext ctx)
    {
        if (message.tileEntityAlchemyArrayNBT != null)
        {
            TileEntityAlchemyArray tileEntityAlchemyArray = new TileEntityAlchemyArray();
            tileEntityAlchemyArray.readFromNBT(message.tileEntityAlchemyArrayNBT);

            TileEntity tileEntity = FMLClientHandler.instance().getClient().theWorld.getTileEntity(tileEntityAlchemyArray.xCoord, tileEntityAlchemyArray.yCoord, tileEntityAlchemyArray.zCoord);

            if (tileEntity instanceof TileEntityAlchemyArray)
            {
View Full Code Here

TOP

Related Classes of com.pahimar.ee3.network.message.MessageSetEnergyValue

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.