Spaces:
Running
Running
Update app.py
Browse files10 unmodified lines11121314151617117 unmodified lines13513613713813914014114214314410 unmodified linesimport threadingimport timeimport uuidimport numpyapp = Flask(__name__)117 unmodified lineselse:block_key = block_palette[block_id]offsets = np.array([x, y, z], dtype=np.int16) + 512chunks = np.divmod(offsets % 1024, 32)pos = ''.join(gchar(c) + gchar(i) for c, i in chunks)if block_key not in data:10 unmodified lines111213141516117 unmodified lines13413513613713813914014114214314414514614710 unmodified linesimport threadingimport timeimport uuidapp = Flask(__name__)117 unmodified lineselse:block_key = block_palette[block_id]x_chunk = gchar(((x + 512) % 1024) // 32)x_in_chunk = gchar(((x + 512) % 1024) % 32)y_chunk = gchar(((y + 512) % 1024) // 32)y_in_chunk = gchar(((y + 512) % 1024) % 32)z_chunk = gchar(((z + 512) % 1024) // 32)z_in_chunk = gchar(((z + 512) % 1024) % 32)pos = f"{x_chunk}{x_in_chunk}{y_chunk}{y_in_chunk}{z_chunk}{z_in_chunk}"if block_key not in data:
app.py+8-5