Package net.minecraft.src

Examples of net.minecraft.src.TileEntity


                    Block block = Block.blocksList[id];

                    if (block != null) {
                      if (renderPass == 0 && block.hasTileEntity()) {
                        TileEntity var20 = chunkCache.getBlockTileEntity(dx, dy, dz);
                        if (TileEntityRenderer.instance.hasSpecialRenderer(var20)) {
                          this.tileEntityRenderers.add(var20);
                        }
                      }
View Full Code Here


    output.writeInt(z);
  }

  public void run(int playerId) {
    World world = SpoutClient.getHandle().theWorld;
    TileEntity te = world.getBlockTileEntity(x, y, z);
    if (te != null && te instanceof TileEntitySign) {
      TileEntitySign sign = (TileEntitySign)te;
      GuiEditSign gui = new GuiEditSign(sign);
      SpoutClient.getHandle().displayGuiScreen(gui);
    }
View Full Code Here

 
    @Override
  public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    if (!world.blockExists(x, y, z)) return null;

    TileEntity tile = world.getBlockTileEntity(x, y, z);
    if (!(tile instanceof TileUsefullEngine)) return null;
    TileUsefullEngine engine = (TileUsefullEngine) tile;

    switch (ID) {
View Full Code Here

  public Object getServerGuiElement(int ID, EntityPlayer player, World world,
      int x, int y, int z) {

    if (!world.blockExists(x, y, z)) return null;

    TileEntity tile = world.getBlockTileEntity(x, y, z);
    if (!(tile instanceof TileUsefullEngine)) return null;

    TileUsefullEngine engine = (TileUsefullEngine) tile;

    switch (ID) {
View Full Code Here

    }

   
    @Override
    public int getBlockTexture(IBlockAccess worldAccess, int i, int j, int k, int side) {
        TileEntity te = worldAccess.getBlockTileEntity(i, j, k);
        if (te != null && te instanceof TileUsefullThings) {
            TileUsefullThings tu = (TileUsefullThings)te;
            if (side < 2) {
                return tu.textureShift() + side;
            }
View Full Code Here

   
    @Override
    public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving) {
        byte facing = (byte)((int)(Math.atan2(k - entityliving.posZ, i - entityliving.posX) / Math.PI * 2 + 2.5D) % 4);
        TileEntity te = world.getBlockTileEntity(i, j, k);
        if (te != null && te instanceof TileUsefullThings) {
            ((TileUsefullThings) te).setFacing(facing);
            world.markBlockNeedsUpdate(i, j, k);
        }
    }
View Full Code Here

        Orientations newPos = temp.get(worldObj.rand.nextInt(temp.size()));
        ////System.out.println(newPos.toString());
        Position destPos = new Position(TempTeleport.get(i).xCoord, TempTeleport.get(i).yCoord, TempTeleport.get(i).zCoord, newPos);
        destPos.moveForwards(1.0);

        TileEntity tile = worldObj.getBlockTileEntity((int)destPos.x, (int)destPos.y, (int)destPos.z);

        if (tile instanceof TileGenericPipe) {
            TileGenericPipe pipe = (TileGenericPipe)tile;

            if (pipe.pipe.transport instanceof PipeTransportItems) {
View Full Code Here

        return result;
    }
   
    public boolean canReceiveLiquid2(Position p) {
        TileEntity entity = worldObj.getBlockTileEntity((int) p.x, (int) p.y,
                            (int) p.z);

        if (!Utils.checkPipesConnections(worldObj, (int) p.x, (int) p.y,
                                         (int) p.z, xCoord, yCoord, zCoord)) {
            return false;
View Full Code Here

        if (theList.size() > 0) {
            for (int b = 0; b < theList.size(); b++) {
                Orientations newPos = theList.get(b);
                Position destPos = new Position(a.xCoord, a.yCoord, a.zCoord, newPos);
                destPos.moveForwards(1.0);
                TileEntity tile = worldObj.getBlockTileEntity((int)destPos.x, (int)destPos.y, (int)destPos.z);

                if (TileNeedsPower(tile)) {
                    needsPower.add(new PowerReturn(tile, newPos.reverse()));
                }
View Full Code Here

        return result;
    }
   
    public boolean canReceivePower(Position p) {
        TileEntity entity = worldObj.getBlockTileEntity((int) p.x, (int) p.y, (int) p.z);

        if (entity instanceof TileGenericPipe || entity instanceof IPowerReceptor) {
            if (Utils.checkPipesConnections(worldObj, (int) p.x, (int) p.y, (int) p.z, xCoord, yCoord, zCoord)) {
                return true;
            }
View Full Code Here

TOP

Related Classes of net.minecraft.src.TileEntity

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.