Package com.pahimar.ee3.reference

Examples of com.pahimar.ee3.reference.Messages$Configuration


    @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


            int trueYCoord = ((TileEntityDummyArray) world.getTileEntity(x, y, z)).getTrueYCoord();
            int trueZCoord = ((TileEntityDummyArray) world.getTileEntity(x, y, z)).getTrueZCoord();

            if (world.getTileEntity(trueXCoord, trueYCoord, trueZCoord) instanceof TileEntityAlchemyArray)
            {
                TileEntityAlchemyArray tileEntityAlchemyArray = (TileEntityAlchemyArray) world.getTileEntity(trueXCoord, trueYCoord, trueZCoord);
                boolean invalidateAlchemyArray = false;

                if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.UP && !world.isSideSolid(x, y - 1, z, ForgeDirection.UP, true))
                {
                    invalidateAlchemyArray = true;
                }
                else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.DOWN && !world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN, true))
                {
                    invalidateAlchemyArray = true;
                }
                else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.NORTH && !world.isSideSolid(x, y, z + 1, ForgeDirection.NORTH, true))
                {
                    invalidateAlchemyArray = true;
                }
                else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.SOUTH && !world.isSideSolid(x, y, z - 1, ForgeDirection.SOUTH, true))
                {
                    invalidateAlchemyArray = true;
                }
                else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.EAST && !world.isSideSolid(x - 1, y, z, ForgeDirection.EAST, true))
                {
                    invalidateAlchemyArray = true;
                }
                else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.WEST && !world.isSideSolid(x + 1, y, z, ForgeDirection.WEST, true))
                {
                    invalidateAlchemyArray = true;
                }

                if (invalidateAlchemyArray)
                {
                    world.getTileEntity(x, y, z).invalidate();
                    tileEntityAlchemyArray.invalidate();
                    world.setBlockToAir(x, y, z);
                    world.setBlockToAir(trueXCoord, trueYCoord, trueZCoord);
                }
            }
        }
View Full Code Here

     * @param metaData
     */
    @Override
    public TileEntity createNewTileEntity(World world, int metaData)
    {
        return new TileEntityAlchemyArray();
    }
View Full Code Here

    @Override
    public void onNeighborBlockChange(World world, int x, int y, int z, Block block)
    {
        if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityAlchemyArray)
        {
            TileEntityAlchemyArray tileEntityAlchemyArray = (TileEntityAlchemyArray) world.getTileEntity(x, y, z);
            boolean invalidateAlchemyArray = false;

            if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.UP && !world.isSideSolid(x, y - 1, z, ForgeDirection.UP, true))
            {
                invalidateAlchemyArray = true;
            }
            else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.DOWN && !world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN, true))
            {
                invalidateAlchemyArray = true;
            }
            else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.NORTH && !world.isSideSolid(x, y, z + 1, ForgeDirection.NORTH, true))
            {
                invalidateAlchemyArray = true;
            }
            else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.SOUTH && !world.isSideSolid(x, y, z - 1, ForgeDirection.SOUTH, true))
            {
                invalidateAlchemyArray = true;
            }
            else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.EAST && !world.isSideSolid(x - 1, y, z, ForgeDirection.EAST, true))
            {
                invalidateAlchemyArray = true;
            }
            else if (tileEntityAlchemyArray.getOrientation() == ForgeDirection.WEST && !world.isSideSolid(x + 1, y, z, ForgeDirection.WEST, true))
            {
                invalidateAlchemyArray = true;
            }

            if (invalidateAlchemyArray)
            {
                tileEntityAlchemyArray.invalidate();
                world.setBlockToAir(x, y, z);
            }
        }
    }
View Full Code Here

    @Override
    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int sideHit, float hitX, float hitY, float hitZ)
    {
        if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityAlchemyArray)
        {
            TileEntityAlchemyArray tileEntityAlchemyArray = (TileEntityAlchemyArray) world.getTileEntity(x, y, z);
            if (entityPlayer.getCurrentEquippedItem() != null && entityPlayer.getCurrentEquippedItem().getItem() instanceof ItemChalk && !entityPlayer.isSneaking())
            {
                NBTTagCompound customEntityData = EntityHelper.getCustomEntityData(entityPlayer);
                ChalkSettings chalkSettings = new ChalkSettings();
                chalkSettings.readFromNBT(customEntityData);

                ResourceLocation glyphTexture = GlyphTextureRegistry.getInstance().getRegisteredGlyphAt(chalkSettings.getIndex());

                if (tileEntityAlchemyArray.addGlyphToAlchemyArray(new Glyph(glyphTexture, GlyphTextureRegistry.getInstance().getRegisteredGlyphTextures().get(glyphTexture)), chalkSettings.getSize()))
                {
                    world.markBlockForUpdate(x, y, z);
                    world.getTileEntity(x, y, z).markDirty();
                    CommonSoundHelper.playChalkSoundAt(entityPlayer);
                    return true;
                }
            }
            else
            {
                tileEntityAlchemyArray.onBlockActivated(world, x, y, z, entityPlayer, sideHit, hitX, hitY, hitZ);
            }
        }

        return false;
    }
View Full Code Here

    @Override
    public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 startVec, Vec3 endVec)
    {
        if (world.getTileEntity(x, y, z) instanceof TileEntityAlchemyArray)
        {
            TileEntityAlchemyArray tileEntityAlchemyArray = (TileEntityAlchemyArray) world.getTileEntity(x, y, z);

            switch (tileEntityAlchemyArray.getOrientation())
            {
                case DOWN:
                {
                    this.setBlockBounds(0f, 1f, 0f, 1f, 1 - 0.0625f, 1f);
                    break;
View Full Code Here

    }

    @Override
    public TileEntity createNewTileEntity(World world, int metaData)
    {
        return new TileEntityAludel();
    }
View Full Code Here

    }

    @Override
    public void onNeighborBlockChange(World world, int x, int y, int z, Block block)
    {
        TileEntityAludel tileEntityAludel = (TileEntityAludel) world.getTileEntity(x, y, z);
        tileEntityAludel.hasGlassBell = world.getTileEntity(x, y + 1, z) instanceof TileEntityGlassBell;

        super.onNeighborBlockChange(world, x, y, z, block);
    }
View Full Code Here

            tileEntityGlassBell.setOrientation(ForgeDirection.UP);

            if (world.getTileEntity(x, y, z) instanceof TileEntityAludel)
            {
                TileEntityAludel tileEntityAludel = (TileEntityAludel) world.getTileEntity(x, y, z);

                ItemStack itemStackGlassBell = tileEntityGlassBell.getStackInSlot(TileEntityGlassBell.DISPLAY_SLOT_INVENTORY_INDEX);

                tileEntityGlassBell.setInventorySlotContents(TileEntityGlassBell.DISPLAY_SLOT_INVENTORY_INDEX, null);

                tileEntityAludel.setInventorySlotContents(TileEntityAludel.INPUT_INVENTORY_INDEX, itemStackGlassBell);

                tileEntityAludel.hasGlassBell = true;
            }
        }
    }
View Full Code Here

    }

    @Override
    public TileEntity createNewTileEntity(World world, int metaData)
    {
        return new TileEntityAugmentationTable();
    }
View Full Code Here

TOP

Related Classes of com.pahimar.ee3.reference.Messages$Configuration

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.