Search in sources :

Example 1 with VoxelSign

use of io.xol.chunkstories.core.voxel.VoxelSign in project chunkstories-core by Hugobros3.

the class Sign method output.

@Override
public void output(World csWorld, int csX, int csY, int csZ, int minecraftBlockId, int minecraftMetaData, MinecraftRegion region, int minecraftCuurrentChunkXinsideRegion, int minecraftCuurrentChunkZinsideRegion, int x, int y, int z) {
    Chunk chunk = csWorld.getChunkWorldCoordinates(csX, csY, csZ);
    assert chunk != null;
    if (voxel instanceof VoxelSign) {
        if (!voxel.getName().endsWith("_post")) {
            if (minecraftMetaData == 2)
                minecraftMetaData = 8;
            else if (minecraftMetaData == 3)
                minecraftMetaData = 0;
            else if (minecraftMetaData == 4)
                minecraftMetaData = 4;
            else if (minecraftMetaData == 5)
                minecraftMetaData = 12;
        }
        /*baked = VoxelFormat.changeMeta(baked, minecraftMetaData);
			
			try {
				baked = ((VoxelSign) voxel).onPlace(chunk.peek(csX, csY, csZ), baked, null);
			} catch (WorldException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			csWorld.pokeRawSilently(csX, csY, csZ, baked);*/
        FutureCell future = new FutureCell(csWorld, csX, csY, csZ, voxel);
        future.setMetaData(minecraftMetaData);
        csWorld.pokeSimple(future);
        try {
            translateSignText(csWorld.peek(csX, csY, csZ).components().get("signData"), region.getChunk(minecraftCuurrentChunkXinsideRegion, minecraftCuurrentChunkZinsideRegion), x, y, z);
        } catch (WorldException e) {
            e.printStackTrace();
        }
    // TODO Move Sign text getting here ?
    } else
        System.out.println("fuck you 666");
}
Also used : FutureCell(io.xol.chunkstories.api.world.cell.FutureCell) WorldException(io.xol.chunkstories.api.exceptions.world.WorldException) MinecraftChunk(io.xol.enklume.MinecraftChunk) Chunk(io.xol.chunkstories.api.world.chunk.Chunk) VoxelSign(io.xol.chunkstories.core.voxel.VoxelSign)

Aggregations

WorldException (io.xol.chunkstories.api.exceptions.world.WorldException)1 FutureCell (io.xol.chunkstories.api.world.cell.FutureCell)1 Chunk (io.xol.chunkstories.api.world.chunk.Chunk)1 VoxelSign (io.xol.chunkstories.core.voxel.VoxelSign)1 MinecraftChunk (io.xol.enklume.MinecraftChunk)1