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

Skip legacy materials when setting up registries.

Doesn't make a difference normally, but avoids errors in special envs.
Dieser Commit ist enthalten in:
wizjany 2019-02-25 18:15:26 -05:00
Ursprung 2f734d4570
Commit 90797d12f4

Datei anzeigen

@ -132,7 +132,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
}
// Block & Item
for (Material material : Material.values()) {
if (material.isBlock()) {
if (material.isBlock() && !material.isLegacy()) {
BlockType.REGISTRY.register(material.getKey().toString(), new BlockType(material.getKey().toString(), blockState -> {
// TODO Use something way less hacky than this.
ParserContext context = new ParserContext();
@ -154,7 +154,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
}
}));
}
if (material.isItem()) {
if (material.isItem() && !material.isLegacy()) {
ItemType.REGISTRY.register(material.getKey().toString(), new ItemType(material.getKey().toString()));
}
}