mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Remove DataException from NbtValued's setNbtData().
This commit is contained in:
parent
759c6ba50d
commit
bdd6d20013
@ -170,12 +170,8 @@ public class MCEditSchematicFormat extends SchematicFormat {
|
|||||||
BlockVector pt = new BlockVector(x, y, z);
|
BlockVector pt = new BlockVector(x, y, z);
|
||||||
BaseBlock block = getBlockForId(blocks[index], blockData[index]);
|
BaseBlock block = getBlockForId(blocks[index], blockData[index]);
|
||||||
|
|
||||||
if (block instanceof TileEntityBlock && tileEntitiesMap.containsKey(pt)) {
|
if (tileEntitiesMap.containsKey(pt)) {
|
||||||
try {
|
block.setNbtData(new CompoundTag("", tileEntitiesMap.get(pt)));
|
||||||
((TileEntityBlock) block).setNbtData(new CompoundTag("", tileEntitiesMap.get(pt)));
|
|
||||||
} catch (com.sk89q.worldedit.world.DataException e) {
|
|
||||||
throw new DataException(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
clipboard.setBlock(pt, block);
|
clipboard.setBlock(pt, block);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,6 @@ public interface NbtValued {
|
|||||||
* @param nbtData NBT data, or null if no data
|
* @param nbtData NBT data, or null if no data
|
||||||
* @throws DataException if possibly the data is invalid
|
* @throws DataException if possibly the data is invalid
|
||||||
*/
|
*/
|
||||||
void setNbtData(@Nullable CompoundTag nbtData) throws DataException;
|
void setNbtData(@Nullable CompoundTag nbtData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user