Package codechicken.lib.vec

Examples of codechicken.lib.vec.BlockCoord


    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


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

        BlockCoord pos = new BlockCoord(tile()).offset(absDir);
        TileMultipart t = PRLib.getMultipartTile(world(), pos);
        if (t != null)
            return getPartSignal(t.partMap(side()), (r+2)%4);

        return 0;
View Full Code Here

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

        BlockCoord cnrPos = new BlockCoord(tile()).offset(absDir);
        BlockCoord pos = cnrPos.copy().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

    public int calculateStraightSignal(int r)
    {
        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)
View Full Code Here

        int i = RedstoneInteractions.getPowerTo(this, absDir)*17;
        if (i > 0)
            return i;

        BlockCoord pos = new BlockCoord(tile()).offset(absDir);
        return world().getIndirectPowerLevelTo(pos.x, pos.y, pos.z, absDir)*17;
    }
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);
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());
View Full Code Here

    {
        int wireMask = wireMask(prev);
        if ((wireMask&2) != 0)
            _updateAndPropogate(prev, mode);
        else
            WirePropagator.addNeighborChange(new BlockCoord(tile()));
    }
View Full Code Here

    @Override
    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

    public int calculateStraightSignal(int r)
    {
        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)
View Full Code Here

TOP

Related Classes of codechicken.lib.vec.BlockCoord

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.