Merge pull request #440 from gamerforEA/master

Fix BlockType and ItemType registration for Sponge distributive
Dieser Commit ist enthalten in:
Matthew Miller 2018-12-25 21:08:07 +10:00 committet von GitHub
Commit 976a92d5ea
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -139,11 +139,17 @@ public class SpongeWorldEdit {
for (BlockType blockType : Sponge.getRegistry().getAllOf(BlockType.class)) {
// TODO Handle blockstate stuff
com.sk89q.worldedit.world.block.BlockTypes.register(new com.sk89q.worldedit.world.block.BlockType(blockType.getId()));
String id = blockType.getId();
if (!com.sk89q.worldedit.world.block.BlockType.REGISTRY.keySet().contains(id)) {
com.sk89q.worldedit.world.block.BlockTypes.register(new com.sk89q.worldedit.world.block.BlockType(id));
}
}
for (ItemType itemType : Sponge.getRegistry().getAllOf(ItemType.class)) {
ItemTypes.register(new com.sk89q.worldedit.world.item.ItemType(itemType.getId()));
String id = itemType.getId();
if (!com.sk89q.worldedit.world.item.ItemType.REGISTRY.keySet().contains(id)) {
ItemTypes.register(new com.sk89q.worldedit.world.item.ItemType(id));
}
}
WorldEdit.getInstance().getPlatformManager().register(platform);