Update BlockState to remove legacy ID usage.

This commit is contained in:
Matthew Miller
2018-07-01 23:38:56 +10:00
parent 93b225ca3c
commit 11f5d05e7b
7 changed files with 83 additions and 125 deletions

View File

@ -479,7 +479,7 @@ public class WorldEdit {
blockBag.flushChanges();
}
Map<Integer, Integer> missingBlocks = editSession.popMissingBlocks();
Map<BlockType, Integer> missingBlocks = editSession.popMissingBlocks();
if (!missingBlocks.isEmpty()) {
StringBuilder str = new StringBuilder();
@ -487,12 +487,8 @@ public class WorldEdit {
int size = missingBlocks.size();
int i = 0;
for (Integer id : missingBlocks.keySet()) {
BlockType type = LegacyMapper.getInstance().getBlockFromLegacy(id).getBlockType();
str.append(type != null
? type.getName() + " (" + id + ")"
: id.toString());
for (BlockType id : missingBlocks.keySet()) {
str.append(id.getName());
str.append(" [Amt: ").append(missingBlocks.get(id)).append("]");