Hook up the biome registry.

This commit is contained in:
wizjany 2019-03-11 00:15:21 -04:00
parent 6192ba8dc1
commit a59d994d84
2 changed files with 8 additions and 1 deletions

View File

@ -1785,7 +1785,7 @@
"48:0": "minecraft:mossy_cobblestone", "48:0": "minecraft:mossy_cobblestone",
"49:0": "minecraft:obsidian", "49:0": "minecraft:obsidian",
"50:0": "minecraft:torch", "50:0": "minecraft:torch",
"52:0": "minecraft:mob_spawner", "52:0": "minecraft:spawner",
"53:0": "minecraft:oak_stairs", "53:0": "minecraft:oak_stairs",
"54:0": "minecraft:chest", "54:0": "minecraft:chest",
"56:0": "minecraft:diamond_ore", "56:0": "minecraft:diamond_ore",

View File

@ -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.handler.WECUIPacketHandler;
import com.sk89q.worldedit.forge.net.packet.LeftClickAirEventMessage; import com.sk89q.worldedit.forge.net.packet.LeftClickAirEventMessage;
import com.sk89q.worldedit.util.Location; 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.BlockCategory;
import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.entity.EntityType; import com.sk89q.worldedit.world.entity.EntityType;
@ -186,6 +187,12 @@ public class ForgeWorldEdit {
EntityType.REGISTRY.register(name.toString(), new EntityType(name.toString())); 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 // Tags
for (ResourceLocation name : BlockTags.getCollection().getRegisteredTags()) { for (ResourceLocation name : BlockTags.getCollection().getRegisteredTags()) {
if (BlockCategory.REGISTRY.get(name.toString()) == null) { if (BlockCategory.REGISTRY.get(name.toString()) == null) {