Ignore bad schematic tileentity coordinates
Dieser Commit ist enthalten in:
Ursprung
aaed31f072
Commit
6e616c6366
@ -239,34 +239,37 @@ class Schematic_14 {
|
|||||||
|
|
||||||
int index = y * width * length + z * width + x;
|
int index = y * width * length + z * width + x;
|
||||||
|
|
||||||
BlockState block = getBlockState(blocks[index], blockData[index]);
|
try{
|
||||||
System.out.println(block.getBlockType().getId());
|
BlockState block = getBlockState(blocks[index], blockData[index]);
|
||||||
BlockState newBlock = block;
|
BlockState newBlock = block;
|
||||||
if (newBlock != null) {
|
if (newBlock != null) {
|
||||||
for (NBTCompatibilityHandler handler : COMPATIBILITY_HANDLERS) {
|
for (NBTCompatibilityHandler handler : COMPATIBILITY_HANDLERS) {
|
||||||
if (handler.isAffectedBlock(newBlock)) {
|
if (handler.isAffectedBlock(newBlock)) {
|
||||||
newBlock = handler.updateNBT(block, values);
|
newBlock = handler.updateNBT(block, values);
|
||||||
if (newBlock == null || values.isEmpty()) {
|
if (newBlock == null || values.isEmpty()) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (values.isEmpty()) {
|
||||||
if (values.isEmpty()) {
|
t = null;
|
||||||
t = null;
|
} else {
|
||||||
} else {
|
t = new CompoundTag(values);
|
||||||
t = new CompoundTag(values);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (fixer != null && t != null) {
|
if (fixer != null && t != null) {
|
||||||
t = fixer.fixUp(DataFixer.FixTypes.BLOCK_ENTITY, t, -1);
|
t = fixer.fixUp(DataFixer.FixTypes.BLOCK_ENTITY, t, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
tileEntitiesMap.put(vec, t.getValue());
|
tileEntitiesMap.put(vec, t.getValue());
|
||||||
|
}
|
||||||
|
blockStates.put(vec, newBlock);
|
||||||
|
}catch(ArrayIndexOutOfBoundsException e){
|
||||||
|
//ignored
|
||||||
}
|
}
|
||||||
blockStates.put(vec, newBlock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockArrayClipboard clipboard = new BlockArrayClipboard(region);
|
BlockArrayClipboard clipboard = new BlockArrayClipboard(region);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren