package com.skcraft.plume.util;

import com.skcraft.plume.common.util.WorldVector3i;
import net.minecraft.entity.Entity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;

public final class Locations {

    private Locations() {
    }

    public static Location3d getLocation3d(Entity entity) {
        return new Location3d(entity.worldObj, entity.posX, entity.posY, entity.posZ);
    }

    public static Location3i getLocation3i(Entity entity) {
        return new Location3i(entity.worldObj, (int) entity.posX, (int) entity.posY, (int) entity.posZ);
    }

    public static WorldVector3i getWorldVector3i(Entity entity) {
        return getLocation3i(entity).toWorldVector();
    }

    public static Location3i getLocation3i(World world, ChunkCoordinates coords) {
        return new Location3i(world, coords.posX, coords.posY, coords.posZ);
    }

    public static Location3d getLocation3d(World world, ChunkCoordinates coords) {
        return new Location3d(world, coords.posX, coords.posY, coords.posZ);
    }

}

@@ -114,16 +114,60 @@
 Entity;%0A
+import net.minecraft.tileentity.TileEntity;%0A
 import n
@@ -650,86 +650,414 @@
 tic 
-WorldVector3i getWorldVector3i(Entity entity) %7B%0A        return getLocation3i(e
+Location3i getLocation3i(TileEntity tileEntity) %7B%0A        return new Location3i(tileEntity.getWorldObj(), tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);%0A    %7D%0A%0A    public static WorldVector3i getWorldVector3i(Entity entity) %7B%0A        return getLocation3i(entity).toWorldVector();%0A    %7D%0A%0A    public static WorldVector3i getWorldVector3i(TileEntity tileEntity) %7B%0A        return getLocation3i(tileE
 ntit

Add Locations methods for tile entities.