From a59d994d84fde12763bbed88fb11bbf2de8780db Mon Sep 17 00:00:00 2001 From: wizjany Date: Mon, 11 Mar 2019 00:15:21 -0400 Subject: [PATCH] Hook up the biome registry. --- .../com/sk89q/worldedit/world/registry/legacy.json | 2 +- .../java/com/sk89q/worldedit/forge/ForgeWorldEdit.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/legacy.json b/worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/legacy.json index 4bc2907a2..ec4c09040 100644 --- a/worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/legacy.json +++ b/worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/legacy.json @@ -1785,7 +1785,7 @@ "48:0": "minecraft:mossy_cobblestone", "49:0": "minecraft:obsidian", "50:0": "minecraft:torch", - "52:0": "minecraft:mob_spawner", + "52:0": "minecraft:spawner", "53:0": "minecraft:oak_stairs", "54:0": "minecraft:chest", "56:0": "minecraft:diamond_ore", diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java index b5a80a36b..9793c6381 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java @@ -33,6 +33,7 @@ import com.sk89q.worldedit.forge.net.handler.InternalPacketHandler; import com.sk89q.worldedit.forge.net.handler.WECUIPacketHandler; import com.sk89q.worldedit.forge.net.packet.LeftClickAirEventMessage; import com.sk89q.worldedit.util.Location; +import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BlockCategory; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.entity.EntityType; @@ -186,6 +187,12 @@ public class ForgeWorldEdit { EntityType.REGISTRY.register(name.toString(), new EntityType(name.toString())); } } + // Biomes + for (ResourceLocation name : ForgeRegistries.BIOMES.getKeys()) { + if (BiomeType.REGISTRY.get(name.toString()) == null) { + BiomeType.REGISTRY.register(name.toString(), new BiomeType(name.toString())); + } + } // Tags for (ResourceLocation name : BlockTags.getCollection().getRegisteredTags()) { if (BlockCategory.REGISTRY.get(name.toString()) == null) {