geforkt von Mirrors/FastAsyncWorldEdit
Skip legacy materials when setting up registries.
Doesn't make a difference normally, but avoids errors in special envs.
Dieser Commit ist enthalten in:
Ursprung
2f734d4570
Commit
90797d12f4
@ -132,7 +132,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
|||||||
}
|
}
|
||||||
// Block & Item
|
// Block & Item
|
||||||
for (Material material : Material.values()) {
|
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 -> {
|
BlockType.REGISTRY.register(material.getKey().toString(), new BlockType(material.getKey().toString(), blockState -> {
|
||||||
// TODO Use something way less hacky than this.
|
// TODO Use something way less hacky than this.
|
||||||
ParserContext context = new ParserContext();
|
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()));
|
ItemType.REGISTRY.register(material.getKey().toString(), new ItemType(material.getKey().toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren