mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix BlockType and ItemType registration for Sponge distributive
This commit is contained in:
parent
2e62389bdc
commit
66415dfa34
@ -139,11 +139,17 @@ public class SpongeWorldEdit {
|
|||||||
|
|
||||||
for (BlockType blockType : Sponge.getRegistry().getAllOf(BlockType.class)) {
|
for (BlockType blockType : Sponge.getRegistry().getAllOf(BlockType.class)) {
|
||||||
// TODO Handle blockstate stuff
|
// 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)) {
|
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);
|
WorldEdit.getInstance().getPlatformManager().register(platform);
|
||||||
|
Loading…
Reference in New Issue
Block a user