◆ MCSchematic()
essentials.Prefabs.Interop.MCSchematic.MCSchematic |
( |
MCBlockMap |
blockMap | ) |
|
◆ Load()
Prefab essentials.Prefabs.Interop.MCSchematic.Load |
( |
Stream |
stream | ) |
|
Attribute: ] blocks = root.Get<byte[
>("Blocks");
Attribute: x,y,z] = _blockMap[blocks[(z*length+y)*width+x]
;
20 var data = NBTData.Load(stream);
21 var root = data.Get<NBTData>(
"Schematic");
23 short width = root.Get<
short>(
"Width");
24 short length = root.Get<
short>(
"Length");
25 short height = root.Get<
short>(
"Height");
27 var prefab =
new Prefab(width, length, height);
29 byte[] blocks = root.Get<byte[]>(
"Blocks");
30 for (
int x=0; x<width; ++x)
32 for (
int y=0; y<length; ++y)
34 for (
int z=0; z<height; ++z)
36 prefab[x,y,z] = _blockMap[blocks[(z*length+y)*width+x]];
45 logger.
LogWarn(
"Converter missed blockId {0}", miss);
Definition: IPluginLogger.cs:6
IEnumerable< byte > MapMisses
Definition: MCBlockMap.cs:40
void LogWarn(string msg, params object[] args)
The documentation for this class was generated from the following file: