Hook up the biome registry.

Dieser Commit ist enthalten in:
wizjany 2019-03-11 00:15:21 -04:00
Ursprung 6192ba8dc1
Commit a59d994d84
2 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -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",

Datei anzeigen

@ -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) {