Files

758 B
Raw Permalink Blame History

Darklord.js — saveBloodBlockSnapshot() (satır 1591)

← Darklord.js · ← Master

function saveBloodBlockSnapshot(world, pool, x, y, z, block)
{
    var key = blockKey(x, y, z);
    if (pool.savedMap[key]) return;

    var id = blockId(block);
    var meta = 0;
    try { meta = Number(block.getMeta()); } catch (e1) {}

    var tile = "";
    try
    {
        if (world.hasTileEntity && world.hasTileEntity(x, y, z))
        {
            var te = world.getTileEntity(x, y, z);
            if (te) tile = String(te.getData());
        }
    }
    catch (e2) {}

    pool.savedMap[key] = true;
    pool.saved.push({ x: x, y: y, z: z, id: id, meta: meta, tile: tile });
}