From cfa1400c262fec3db4a903538a6cbe7207fc4930 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 24 Aug 2012 16:02:38 -0700 Subject: [PATCH] Changed SchematicFormat to create only BaseBlocks rather than their subclasses, to prevent data loss. --- .../worldedit/schematic/SchematicFormat.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/schematic/SchematicFormat.java b/src/main/java/com/sk89q/worldedit/schematic/SchematicFormat.java index e589723a7..274611167 100644 --- a/src/main/java/com/sk89q/worldedit/schematic/SchematicFormat.java +++ b/src/main/java/com/sk89q/worldedit/schematic/SchematicFormat.java @@ -18,17 +18,6 @@ package com.sk89q.worldedit.schematic; -import com.sk89q.worldedit.CuboidClipboard; -import com.sk89q.worldedit.blocks.BaseBlock; -import com.sk89q.worldedit.blocks.BlockID; -import com.sk89q.worldedit.blocks.ChestBlock; -import com.sk89q.worldedit.blocks.DispenserBlock; -import com.sk89q.worldedit.blocks.FurnaceBlock; -import com.sk89q.worldedit.blocks.MobSpawnerBlock; -import com.sk89q.worldedit.blocks.NoteBlock; -import com.sk89q.worldedit.blocks.SignBlock; -import com.sk89q.worldedit.data.DataException; - import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -39,6 +28,10 @@ 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.data.DataException; + /** * Represents a format that a schematic can be stored as * @author zml2008 @@ -101,7 +94,7 @@ public abstract class SchematicFormat { public BaseBlock getBlockForId(int id, short data) { BaseBlock block; switch (id) { - case BlockID.WALL_SIGN: + /*case BlockID.WALL_SIGN: case BlockID.SIGN_POST: block = new SignBlock(id, data); break; @@ -125,7 +118,7 @@ public abstract class SchematicFormat { case BlockID.NOTE_BLOCK: block = new NoteBlock(data); - break; + break;*/ default: block = new BaseBlock(id, data);