Package codechicken.multipart

Examples of codechicken.multipart.TileMultipart


                        (float)f.x, (float)f.y, (float)f.z));
                return true;
            }
        }
       
        TileMultipart tile = TileMultipart.getOrConvertTile(world, pos);
        if(tile == null || !tile.canAddPart(part))
            return false;
       
        if(!world.isRemote)
        {
            TileMultipart.addPart(world, pos, part);
View Full Code Here


    private static boolean topWireConn(GatePart g, int r)
    {
        int absDir = Rotation.rotateSide(g.side(), r);

        BlockCoord pos = new BlockCoord(g.tile()).offset(absDir);
        TileMultipart t = PRLib.getMultipartTile(g.world(), pos);
        if (t != null)
        {
            TMultiPart tp = t.partMap(g.side());
            if (tp instanceof ITopArrayWire)
            {
                int a_r = ((GatePart) tp).rotation();
                return (a_r & 1) == (g.rotation() & 1);
            }
View Full Code Here

    public int calculateCornerSignal(int r)
    {
        int absDir = Rotation.rotateSide(side(), r);

        BlockCoord pos = new BlockCoord(tile()).offset(absDir).offset(side());
        TileMultipart t = PRLib.getMultipartTile(world(), pos);
        if (t != null)
            return getPartSignal(t.partMap(absDir^1), Rotation.rotationTo(absDir^1, side()^1));

        return 0;
    }
View Full Code Here

    {
        int absDir = Rotation.rotateSide(side(), r);
        int s = 0;

        BlockCoord pos = new BlockCoord(tile()).offset(absDir);
        TileMultipart t = PRLib.getMultipartTile(world(), pos);
        if (t != null && (connMap&0x10<<r) != 0)
        {
            TMultiPart tp = t.partMap(side());
            if (tp != null)
                s = getPartSignal(tp, (r+2)%4);
        }
        else
        {
View Full Code Here

    public void propogateCorner(int r, TMultiPart prev, int mode)
    {
        int absDir = Rotation.rotateSide(side(), r);
        BlockCoord pos = new BlockCoord(tile()).offset(absDir).offset(side());

        TileMultipart t = PRLib.getMultipartTile(world(), pos);
        if (t != null)
        {
            TMultiPart tp = t.partMap(absDir^1);
            if (tp == prev)
                return;
            if (propogateTo(tp, mode))
                return;
        }
View Full Code Here

    public void propogateStraight(int r, TMultiPart prev, int mode)
    {
        int absDir = Rotation.rotateSide(side(), r);
        BlockCoord pos = new BlockCoord(tile()).offset(absDir);

        TileMultipart t = PRLib.getMultipartTile(world(), pos);
        if (t != null)
        {
            TMultiPart tp = t.partMap(side());
            if (tp == prev)
                return;
            if (propogateTo(tp, mode))
                return;
        }
View Full Code Here

    public byte[] calculateBundledCornerSignal(int r)
    {
        int absDir = Rotation.rotateSide(side(), r);

        BlockCoord pos = new BlockCoord(tile()).offset(absDir).offset(side());
        TileMultipart t = PRLib.getMultipartTile(world(), pos);
        if (t != null)
            return getBundledPartSignal(t.partMap(absDir^1), Rotation.rotationTo(absDir^1, side()^1));

        return null;
    }
View Full Code Here

            .getCurrentItem(), (float) f.x, (float) f.y, (float) f.z ) );
        return true;
      }
    }

    TileMultipart tile = TileMultipart.getOrConvertTile( world, pos );
    if ( tile == null || !tile.canAddPart( part ) )
      return false;

    if ( !world.isRemote )
    {
      TileMultipart.addPart( world, pos, part );
View Full Code Here

  {
    try
    {
      BlockCoord loc = new BlockCoord( tile.xCoord, tile.yCoord, tile.zCoord );

      TileMultipart mp = TileMultipart.getOrConvertTile( tile.getWorldObj(), loc );
      if ( mp != null )
      {
        scala.collection.Iterator<TMultiPart> i = mp.partList().iterator();
        while (i.hasNext())
        {
          TMultiPart p = i.next();
          if ( p instanceof CableBusPart )
            return (IPartHost) p;
View Full Code Here

  @Override
  public CableBusContainer getCableContainer(TileEntity te)
  {
    if ( te instanceof TileMultipart )
    {
      TileMultipart mp = (TileMultipart) te;
      scala.collection.Iterator<TMultiPart> i = mp.partList().iterator();
      while (i.hasNext())
      {
        TMultiPart p = i.next();
        if ( p instanceof CableBusPart )
          return ((CableBusPart) p).cb;
View Full Code Here

TOP

Related Classes of codechicken.multipart.TileMultipart

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.