Package net.minecraft.world

Examples of net.minecraft.world.ChunkPosition


    private ChunkPosition getDugBlock(){
        int x = dataWatcher.getWatchableObjectInt(18);
        int y = dataWatcher.getWatchableObjectInt(19);
        int z = dataWatcher.getWatchableObjectInt(20);
        return x != 0 || y != 0 || z != 0 ? new ChunkPosition(x, y, z) : null;
    }
View Full Code Here


            GL11.glColor4d(1, 1, 1, 1);
            // GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glEnable(GL11.GL_TEXTURE_2D);
            GL11.glPopMatrix();
        }
        ChunkPosition diggingPos = getDugBlock();
        if(diggingPos != null) {
            if(digLaser == null) {
                int color = 0xFF0000;
                if(colorMap.containsKey(getCustomNameTag().toLowerCase())) {
                    color = colorMap.get(getCustomNameTag().toLowerCase());
View Full Code Here

    @Override
    public boolean interact(EntityPlayer player){
        ItemStack equippedItem = player.getCurrentEquippedItem();
        if(!worldObj.isRemote && equippedItem != null) {
            if(equippedItem.getItem() == Itemss.GPSTool) {
                ChunkPosition gpsLoc = ItemGPSTool.getGPSLocation(equippedItem);
                if(gpsLoc != null) {
                    getNavigator().tryMoveToXYZ(gpsLoc.chunkPosX, gpsLoc.chunkPosY, gpsLoc.chunkPosZ, 0.1D);
                }
            }
        }
View Full Code Here

        }
        return areaTypes;
    }

    public void addArea(int x, int y, int z){
        area.add(new ChunkPosition(x, y, z));
    }
View Full Code Here

    public void addArea(int x1, int y1, int z1, int x2, int y2, int z2, String areaType) throws IllegalArgumentException{
        area.addAll(getArea(x1, y1, z1, x2, y2, z2, areaType));
    }

    public void removeArea(int x, int y, int z){
        area.remove(new ChunkPosition(x, y, z));
    }
View Full Code Here

        return livingEntities;
    }

    private ProgWidgetArea getEntityAreaWidget(){
        ProgWidgetArea widget = new ProgWidgetArea();
        ChunkPosition minPos = getMinPos();
        ChunkPosition maxPos = getMaxPos();
        widget.x1 = minPos.chunkPosX;
        widget.y1 = minPos.chunkPosY;
        widget.z1 = minPos.chunkPosZ;
        widget.x2 = maxPos.chunkPosX;
        widget.y2 = maxPos.chunkPosY;
View Full Code Here

        for(ChunkPosition p : area) {
            x = Math.min(p.chunkPosX, x);
            y = Math.min(p.chunkPosY, y);
            z = Math.min(p.chunkPosZ, z);
        }
        return new ChunkPosition(x, y, z);
    }
View Full Code Here

        for(ChunkPosition p : area) {
            x = Math.max(p.chunkPosX, x);
            y = Math.max(p.chunkPosY, y);
            z = Math.max(p.chunkPosZ, z);
        }
        return new ChunkPosition(x, y, z);
    }
View Full Code Here

        updateTube();
    }

    @Override
    public void onPartChanged(TMultiPart part){
        if(FMP.getMultiPart(world(), new ChunkPosition(x(), y(), z()), PartPressureTube.class) == null) {//If the tube was removed
            if(!world().isRemote) {
                tile().dropItems(getDrops());
                tile().remPart(this);
            }
        } else {
View Full Code Here

        setCreativeTab(PneumaticCraft.tabPneumaticCraft);
    }

    @Override
    public boolean onItemUse(ItemStack stack, EntityPlayer player, World w, int x, int y, int z, int side, float hitX, float hitY, float hitZ){
        if(FMP.getMultiPart(w, new ChunkPosition(x, y, z), PartPressureTube.class) != null || w.getBlock(x, y, z) == Blockss.pressureTube) {
            BlockCoord pos = new BlockCoord(x, y, z);
            Vector3 vhit = new Vector3(hitX, hitY, hitZ);
            double d = getHitDepth(vhit, side);
            if(d < 1 && place(stack, player, pos, w, side, vhit)) {
                w.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, Block.soundTypeGlass.getStepResourcePath(), Block.soundTypeGlass.getVolume() * 5.0F, Block.soundTypeGlass.getPitch() * .9F);
 
View Full Code Here

TOP

Related Classes of net.minecraft.world.ChunkPosition

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.