3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 11:00:04 +01:00

Throw old DataExceptions in schematic related classes.

The schematic related classes are slated for deprecation at some point.
Dieser Commit ist enthalten in:
sk89q 2014-04-04 13:59:28 -07:00
Ursprung 3294431e00
Commit 224bfef50c
3 geänderte Dateien mit 26 neuen und 34 gelöschten Zeilen

Datei anzeigen

@ -24,4 +24,11 @@ package com.sk89q.worldedit.data;
*/
@Deprecated
public class DataException extends com.sk89q.worldedit.world.DataException {
public DataException(String msg) {
super(msg);
}
public DataException() {
}
}

Datei anzeigen

@ -18,11 +18,15 @@
package com.sk89q.worldedit.schematic;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import com.sk89q.jnbt.*;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.CuboidClipboard;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.TileEntityBlock;
import com.sk89q.worldedit.data.DataException;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -30,23 +34,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.zip.GZIPInputStream;
import com.sk89q.jnbt.ByteArrayTag;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.IntTag;
import com.sk89q.jnbt.ListTag;
import com.sk89q.jnbt.NBTConstants;
import com.sk89q.jnbt.NBTInputStream;
import com.sk89q.jnbt.NBTOutputStream;
import com.sk89q.jnbt.ShortTag;
import com.sk89q.jnbt.StringTag;
import com.sk89q.jnbt.Tag;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.CuboidClipboard;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.TileEntityBlock;
import com.sk89q.worldedit.world.DataException;
/**
* @author zml2008
*/
@ -184,7 +171,11 @@ public class MCEditSchematicFormat extends SchematicFormat {
BaseBlock block = getBlockForId(blocks[index], blockData[index]);
if (block instanceof TileEntityBlock && tileEntitiesMap.containsKey(pt)) {
try {
((TileEntityBlock) block).setNbtData(new CompoundTag("", tileEntitiesMap.get(pt)));
} catch (com.sk89q.worldedit.world.DataException e) {
throw new DataException(e.getMessage());
}
}
clipboard.setBlock(pt, block);
}

Datei anzeigen

@ -18,19 +18,13 @@
package com.sk89q.worldedit.schematic;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.sk89q.worldedit.CuboidClipboard;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.DataException;
import com.sk89q.worldedit.data.DataException;
import java.io.File;
import java.io.IOException;
import java.util.*;
/**
* Represents a format that a schematic can be stored as