Package pneumaticCraft.common.tileentity

Examples of pneumaticCraft.common.tileentity.TileEntityUniversalSensor


    }

    @Override
    public void renderDynamic(float size, TileEntity te, float partialTicks){
        if(te instanceof TileEntityUniversalSensor) {
            TileEntityUniversalSensor tile = (TileEntityUniversalSensor)te;
            renderModel(size, tile.oldDishRotation + (tile.dishRotation - tile.oldDishRotation) * partialTicks);
            tile.renderRangeLines();
        } else {
            renderModel(size, 0);
        }
    }
View Full Code Here


            return coordinateSensor.getDescription();
        }

        @Override
        public int emitRedstoneOnEvent(Event event, TileEntity tile, int sensorRange, String textboxText){
            TileEntityUniversalSensor teUs = (TileEntityUniversalSensor)tile;
            for(int i = TileEntityUniversalSensor.UPGRADE_SLOT_1; i <= TileEntityUniversalSensor.UPGRADE_SLOT_4; i++) {
                if(teUs.getStackInSlot(i) != null && teUs.getStackInSlot(i).getItem() == Itemss.GPSTool && teUs.getStackInSlot(i).hasTagCompound()) {
                    NBTTagCompound gpsTag = teUs.getStackInSlot(i).getTagCompound();
                    int toolX = gpsTag.getInteger("x");
                    int toolY = gpsTag.getInteger("y");
                    int toolZ = gpsTag.getInteger("z");
                    if(Math.abs(toolX - teUs.xCoord) <= sensorRange && Math.abs(toolY - teUs.yCoord) <= sensorRange && Math.abs(toolZ - teUs.zCoord) <= sensorRange) {
                        return coordinateSensor.emitRedstoneOnEvent(event, teUs, sensorRange, toolX, toolY, toolZ);
View Full Code Here

    @Override
    public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5){

        TileEntity te = par1IBlockAccess.getTileEntity(par2, par3, par4);
        if(te instanceof TileEntityUniversalSensor) {
            TileEntityUniversalSensor teUs = (TileEntityUniversalSensor)te;
            return teUs.redstoneStrength;
        }

        return 0;
    }
View Full Code Here

        @Override
        public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText){
            TileEntity te = world.getTileEntity(x, y, z);
            if(te instanceof TileEntityUniversalSensor) {
                TileEntityUniversalSensor teUs = (TileEntityUniversalSensor)te;

                for(int i = TileEntityUniversalSensor.UPGRADE_SLOT_1; i <= TileEntityUniversalSensor.UPGRADE_SLOT_4; i++) {
                    if(teUs.getStackInSlot(i) != null && teUs.getStackInSlot(i).getItem() == Itemss.GPSTool && teUs.getStackInSlot(i).hasTagCompound()) {
                        NBTTagCompound gpsTag = teUs.getStackInSlot(i).getTagCompound();
                        int toolX = gpsTag.getInteger("x");
                        int toolY = gpsTag.getInteger("y");
                        int toolZ = gpsTag.getInteger("z");
                        if(Math.abs(toolX - x) <= sensorRange && Math.abs(toolY - y) <= sensorRange && Math.abs(toolZ - z) <= sensorRange) {
                            return coordinateSensor.getRedstoneValue(world, x, y, z, sensorRange, textBoxText, toolX, toolY, toolZ);
View Full Code Here

    @Override
    public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText){
        TileEntity te = world.getTileEntity(x, y, z);
        if(te instanceof TileEntityUniversalSensor) {
            TileEntityUniversalSensor teUs = (TileEntityUniversalSensor)te;

            for(int i = TileEntityUniversalSensor.UPGRADE_SLOT_1; i <= TileEntityUniversalSensor.UPGRADE_SLOT_4; i++) {
                if(teUs.getStackInSlot(i) != null && teUs.getStackInSlot(i).getItem() == Itemss.GPSTool && teUs.getStackInSlot(i).hasTagCompound()) {
                    NBTTagCompound gpsTag = teUs.getStackInSlot(i).getTagCompound();
                    int toolX = gpsTag.getInteger("x");
                    int toolY = gpsTag.getInteger("y");
                    int toolZ = gpsTag.getInteger("z");
                    if(Math.abs(toolX - x) <= sensorRange && Math.abs(toolY - y) <= sensorRange && Math.abs(toolZ - z) <= sensorRange) {
                        return getRedstoneValue(world, x, y, z, sensorRange, textBoxText, toolX, toolY, toolZ);
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.tileentity.TileEntityUniversalSensor

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.