Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
package net.minecraftforge.common;
|
|
|
|
|
|
|
|
import java.util.*;
|
2013-09-05 14:08:02 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
import net.minecraftforge.fml.common.FMLLog;
|
2014-07-01 02:46:00 +00:00
|
|
|
import net.minecraft.init.Blocks;
|
2016-03-03 07:07:18 +00:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
import net.minecraft.world.biome.*;
|
2014-07-08 04:29:37 +00:00
|
|
|
import net.minecraftforge.common.util.EnumHelper;
|
2013-09-05 14:08:02 +00:00
|
|
|
import net.minecraftforge.event.terraingen.DeferredBiomeDecorator;
|
2016-03-03 07:07:18 +00:00
|
|
|
import static net.minecraft.init.Biomes.*;
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
import static net.minecraftforge.common.BiomeDictionary.Type.*;
|
|
|
|
|
|
|
|
public class BiomeDictionary
|
|
|
|
{
|
|
|
|
public enum Type
|
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
/*Temperature-based tags. Specifying neither implies a biome is temperate*/
|
|
|
|
HOT,
|
|
|
|
COLD,
|
|
|
|
/*Tags specifying the amount of vegetation a biome has. Specifying neither implies a biome to have moderate amounts*/
|
|
|
|
SPARSE,
|
|
|
|
DENSE,
|
|
|
|
/*Tags specifying how moist a biome is. Specifying neither implies the biome as having moderate humidity*/
|
|
|
|
WET,
|
|
|
|
DRY,
|
|
|
|
/*Tree-based tags, SAVANNA refers to dry, desert-like trees (Such as Acacia), CONIFEROUS refers to snowy trees (Such as Spruce) and JUNGLE refers to jungle trees.
|
|
|
|
* Specifying no tag implies a biome has temperate trees (Such as Oak)*/
|
|
|
|
SAVANNA,
|
|
|
|
CONIFEROUS,
|
|
|
|
JUNGLE,
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
/*Tags specifying the nature of a biome*/
|
|
|
|
SPOOKY,
|
|
|
|
DEAD,
|
|
|
|
LUSH,
|
|
|
|
NETHER,
|
|
|
|
END,
|
|
|
|
MUSHROOM,
|
|
|
|
MAGICAL,
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
OCEAN,
|
|
|
|
RIVER,
|
|
|
|
/**A general tag for all water-based biomes. Shown as present if OCEAN or RIVER are.**/
|
|
|
|
WATER(OCEAN, RIVER),
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
/*Generic types which a biome can be*/
|
|
|
|
MESA,
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
FOREST,
|
|
|
|
PLAINS,
|
|
|
|
MOUNTAIN,
|
|
|
|
HILLS,
|
|
|
|
SWAMP,
|
2014-07-01 02:46:00 +00:00
|
|
|
SANDY,
|
|
|
|
SNOWY,
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
WASTELAND,
|
2016-03-03 07:07:18 +00:00
|
|
|
BEACH;
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
private List<Type> subTags;
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
private Type(Type... subTags)
|
|
|
|
{
|
|
|
|
this.subTags = Arrays.asList(subTags);
|
|
|
|
}
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
private boolean hasSubTags()
|
|
|
|
{
|
|
|
|
return subTags != null && !subTags.isEmpty();
|
|
|
|
}
|
2014-07-08 04:29:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves a Type value by name,
|
|
|
|
* if one does not exist already it creates one.
|
|
|
|
* This can be used as interm measure for modders to
|
|
|
|
* add there own category of Biome.
|
|
|
|
*
|
|
|
|
* There are NO naming conventions besides:
|
|
|
|
* MUST be all upper case (enforced by name.toUpper())
|
|
|
|
* NO Special characters. {Unenforced, just don't be a pain, if it becomes a issue I WILL
|
|
|
|
* make this RTE with no worry about backwards compatibility}
|
|
|
|
*
|
|
|
|
* Note: For performance sake, the return value of this function SHOULD be cached.
|
|
|
|
* Two calls with the same name SHOULD return the same value.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param name The name of this Type
|
|
|
|
* @return An instance of Type for this name.
|
|
|
|
*/
|
|
|
|
public static Type getType(String name, Type... subTypes)
|
|
|
|
{
|
|
|
|
name = name.toUpperCase();
|
|
|
|
for (Type t : values())
|
|
|
|
{
|
|
|
|
if (t.name().equals(name))
|
|
|
|
return t;
|
|
|
|
}
|
2014-08-15 03:33:23 +00:00
|
|
|
Type ret = EnumHelper.addEnum(Type.class, name, new Class[]{Type[].class}, new Object[]{subTypes});
|
|
|
|
if (ret.ordinal() >= typeInfoList.length)
|
|
|
|
{
|
2015-06-13 00:08:19 +00:00
|
|
|
typeInfoList = Arrays.copyOf(typeInfoList, ret.ordinal()+1);
|
|
|
|
}
|
2016-03-03 07:07:18 +00:00
|
|
|
for(BiomeInfo bInfo:biomeInfoMap.values())
|
2015-06-13 00:08:19 +00:00
|
|
|
{
|
|
|
|
if(bInfo != null)
|
|
|
|
{
|
|
|
|
EnumSet<Type> oldSet = bInfo.typeList;
|
|
|
|
bInfo.typeList = EnumSet.noneOf(Type.class);
|
|
|
|
bInfo.typeList.addAll(oldSet);
|
|
|
|
}
|
2014-08-15 03:33:23 +00:00
|
|
|
}
|
|
|
|
return ret;
|
2014-07-08 04:29:37 +00:00
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
private static HashMap<ResourceLocation, BiomeInfo> biomeInfoMap = new HashMap<ResourceLocation, BiomeInfo>();
|
2014-01-18 05:55:48 +00:00
|
|
|
@SuppressWarnings("unchecked")
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
private static ArrayList<BiomeGenBase>[] typeInfoList = new ArrayList[Type.values().length];
|
|
|
|
|
|
|
|
private static class BiomeInfo
|
|
|
|
{
|
|
|
|
public EnumSet<Type> typeList;
|
|
|
|
|
|
|
|
public BiomeInfo(Type[] types)
|
|
|
|
{
|
|
|
|
typeList = EnumSet.noneOf(Type.class);
|
|
|
|
for(Type t : types)
|
|
|
|
{
|
|
|
|
typeList.add(t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static
|
|
|
|
{
|
|
|
|
registerVanillaBiomes();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Registers a biome with a specific biome type
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* @param biome the biome to be registered
|
|
|
|
* @param type the type to register the biome as
|
|
|
|
* @return returns true if the biome was registered successfully
|
|
|
|
*/
|
|
|
|
public static boolean registerBiomeType(BiomeGenBase biome, Type ... types)
|
2014-07-08 04:29:37 +00:00
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
types = listSubTags(types);
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if(BiomeGenBase.field_185377_q.getNameForObject(biome) != null)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
|
|
|
for(Type type : types)
|
|
|
|
{
|
|
|
|
if(typeInfoList[type.ordinal()] == null)
|
|
|
|
{
|
|
|
|
typeInfoList[type.ordinal()] = new ArrayList<BiomeGenBase>();
|
|
|
|
}
|
|
|
|
|
|
|
|
typeInfoList[type.ordinal()].add(biome);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if(!isBiomeRegistered(biome))
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
ResourceLocation location = BiomeGenBase.field_185377_q.getNameForObject(biome);
|
|
|
|
biomeInfoMap.put(location, new BiomeInfo(types));
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for(Type type : types)
|
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
getBiomeInfo(biome).typeList.add(type);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of biomes registered with a specific type
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* @param type the Type to look for
|
|
|
|
* @return a list of biomes of the specified type, null if there are none
|
|
|
|
*/
|
|
|
|
public static BiomeGenBase[] getBiomesForType(Type type)
|
|
|
|
{
|
|
|
|
if(typeInfoList[type.ordinal()] != null)
|
|
|
|
{
|
2013-04-19 11:29:07 +00:00
|
|
|
return (BiomeGenBase[])typeInfoList[type.ordinal()].toArray(new BiomeGenBase[0]);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return new BiomeGenBase[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a list of Types that a specific biome is registered with
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* @param biome the biome to check
|
|
|
|
* @return the list of types, null if there are none
|
|
|
|
*/
|
|
|
|
public static Type[] getTypesForBiome(BiomeGenBase biome)
|
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
checkRegistration(biome);
|
|
|
|
return (Type[])getBiomeInfo(biome).typeList.toArray(new Type[0]);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks to see if two biomes are registered as having the same type
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* @param biomeA
|
|
|
|
* @param biomeB
|
|
|
|
* @return returns true if a common type is found, false otherwise
|
|
|
|
*/
|
|
|
|
public static boolean areBiomesEquivalent(BiomeGenBase biomeA, BiomeGenBase biomeB)
|
|
|
|
{
|
|
|
|
checkRegistration(biomeA);
|
|
|
|
checkRegistration(biomeB);
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
for(Type type : getTypesForBiome(biomeA))
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
if(containsType(getBiomeInfo(biomeB), type))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks to see if the given biome is registered as being a specific type
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* @param biome the biome to be considered
|
|
|
|
* @param type the type to check for
|
|
|
|
* @return returns true if the biome is registered as being of type type, false otherwise
|
|
|
|
*/
|
|
|
|
public static boolean isBiomeOfType(BiomeGenBase biome, Type type)
|
|
|
|
{
|
|
|
|
checkRegistration(biome);
|
2016-03-03 07:07:18 +00:00
|
|
|
return containsType(getBiomeInfo(biome), type);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks to see if the given biome has been registered as being of any type
|
|
|
|
* @param biome the biome to consider
|
|
|
|
* @return returns true if the biome has been registered, false otherwise
|
|
|
|
*/
|
|
|
|
public static boolean isBiomeRegistered(BiomeGenBase biome)
|
2014-07-08 04:29:37 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
return biomeInfoMap.containsKey(BiomeGenBase.field_185377_q.getNameForObject(biome));
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
2013-09-05 14:08:02 +00:00
|
|
|
public static void registerAllBiomes()
|
|
|
|
{
|
|
|
|
FMLLog.warning("Redundant call to BiomeDictionary.registerAllBiomes ignored");
|
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
/**
|
|
|
|
* Loops through the biome list and automatically adds tags to any biome that does not have any
|
2013-09-05 14:08:02 +00:00
|
|
|
* This is called by Forge at postinit time. It will additionally dispatch any deferred decorator
|
|
|
|
* creation events.
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* DO NOT call this during world generation
|
|
|
|
*/
|
2013-09-05 14:08:02 +00:00
|
|
|
public static void registerAllBiomesAndGenerateEvents()
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
for (ResourceLocation biomeResource : BiomeGenBase.field_185377_q.getKeys())
|
|
|
|
{
|
|
|
|
BiomeGenBase biome = BiomeGenBase.field_185377_q.getObject(biomeResource);
|
|
|
|
|
2013-09-05 14:08:02 +00:00
|
|
|
if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator)
|
|
|
|
{
|
|
|
|
DeferredBiomeDecorator decorator = (DeferredBiomeDecorator) biome.theBiomeDecorator;
|
2013-12-21 08:10:35 +00:00
|
|
|
decorator.fireCreateEventAndReplace(biome);
|
2013-09-05 14:08:02 +00:00
|
|
|
}
|
2013-10-20 01:31:32 +00:00
|
|
|
|
|
|
|
checkRegistration(biome);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Automatically looks for and registers a given biome with appropriate tags
|
|
|
|
* This method is called automatically if a biome has not been registered with any tags,
|
|
|
|
* And another method requests information about it
|
2014-07-08 04:29:37 +00:00
|
|
|
*
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
* @param biome the biome to be considered
|
|
|
|
*/
|
|
|
|
public static void makeBestGuess(BiomeGenBase biome)
|
2014-07-08 04:29:37 +00:00
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
if (biome.theBiomeDecorator.treesPerChunk >= 3)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.isHighHumidity() && biome.func_185353_n() >= 0.9F)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, JUNGLE);
|
|
|
|
}
|
2014-07-01 02:46:00 +00:00
|
|
|
else if (!biome.isHighHumidity())
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, FOREST);
|
2014-07-01 02:46:00 +00:00
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185353_n() <= 0.2f)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, CONIFEROUS);
|
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-03 07:07:18 +00:00
|
|
|
else if(biome.func_185360_m() <= 0.3F && biome.func_185360_m() >= 0.0F)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
if(!biome.isHighHumidity() || biome.func_185355_j() >= 0.0F)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, PLAINS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.getFloatRainfall() > 0.85f)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, WET);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.getFloatRainfall() < 0.15f)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, DRY);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185353_n() > 0.85f)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, HOT);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185353_n() < 0.15f)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, COLD);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (biome.theBiomeDecorator.treesPerChunk > 0 && biome.theBiomeDecorator.treesPerChunk < 3)
|
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, SPARSE);
|
|
|
|
}
|
|
|
|
else if (biome.theBiomeDecorator.treesPerChunk >= 10)
|
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, DENSE);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.isHighHumidity() && biome.func_185355_j() < 0.0F && (biome.func_185360_m() <= 0.3F && biome.func_185360_m() >= 0.0F))
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, SWAMP);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185355_j() <= -0.5F)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185360_m() == 0.0F)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, RIVER);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, OCEAN);
|
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185360_m() >= 0.4F && biome.func_185360_m() < 1.5F)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, HILLS);
|
|
|
|
}
|
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.func_185360_m() >= 1.5F)
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, MOUNTAIN);
|
|
|
|
}
|
2014-07-01 02:46:00 +00:00
|
|
|
|
|
|
|
if (biome.getEnableSnow())
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
BiomeDictionary.registerBiomeType(biome, SNOWY);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
2014-07-01 02:46:00 +00:00
|
|
|
|
2016-03-03 07:07:18 +00:00
|
|
|
if (biome.topBlock != Blocks.sand && biome.func_185353_n() >= 1.0f && biome.getFloatRainfall() < 0.2f)
|
2014-07-01 02:46:00 +00:00
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, SAVANNA);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (biome.topBlock == Blocks.sand )
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
BiomeDictionary.registerBiomeType(biome, SANDY);
|
|
|
|
}
|
|
|
|
else if (biome.topBlock == Blocks.mycelium)
|
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, MUSHROOM);
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
2015-06-19 14:04:19 +00:00
|
|
|
if (biome.fillerBlock == Blocks.hardened_clay)
|
|
|
|
{
|
|
|
|
BiomeDictionary.registerBiomeType(biome, MESA);
|
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
|
|
|
|
2014-07-08 04:29:37 +00:00
|
|
|
//Internal implementation
|
2016-03-03 07:07:18 +00:00
|
|
|
private static BiomeInfo getBiomeInfo(BiomeGenBase biome)
|
|
|
|
{
|
|
|
|
return biomeInfoMap.get(BiomeGenBase.field_185377_q.getNameForObject(biome));
|
|
|
|
}
|
|
|
|
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
private static void checkRegistration(BiomeGenBase biome)
|
|
|
|
{
|
|
|
|
if(!isBiomeRegistered(biome))
|
|
|
|
{
|
|
|
|
makeBestGuess(biome);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private static boolean containsType(BiomeInfo info, Type type)
|
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
if (type.hasSubTags())
|
|
|
|
{
|
|
|
|
for (Type remappedType : listSubTags(type))
|
|
|
|
{
|
|
|
|
if (info.typeList.contains(remappedType)) return true;
|
|
|
|
}
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
return false;
|
|
|
|
}
|
2014-07-08 04:29:37 +00:00
|
|
|
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
return info.typeList.contains(type);
|
|
|
|
}
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
private static Type[] listSubTags(Type... types)
|
|
|
|
{
|
|
|
|
List<Type> subTags = new ArrayList<Type>();
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
for (Type type : types)
|
|
|
|
{
|
|
|
|
if (type.hasSubTags()) subTags.addAll(type.subTags);
|
|
|
|
else subTags.add(type);
|
|
|
|
}
|
2014-07-08 04:29:37 +00:00
|
|
|
|
2014-07-01 02:46:00 +00:00
|
|
|
return subTags.toArray(new Type[subTags.size()]);
|
|
|
|
}
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
|
|
|
|
private static void registerVanillaBiomes()
|
|
|
|
{
|
2014-07-01 02:46:00 +00:00
|
|
|
registerBiomeType(ocean, OCEAN );
|
|
|
|
registerBiomeType(plains, PLAINS );
|
|
|
|
registerBiomeType(desert, HOT, DRY, SANDY );
|
|
|
|
registerBiomeType(extremeHills, MOUNTAIN, HILLS );
|
|
|
|
registerBiomeType(forest, FOREST );
|
|
|
|
registerBiomeType(taiga, COLD, CONIFEROUS, FOREST );
|
|
|
|
registerBiomeType(taigaHills, COLD, CONIFEROUS, FOREST, HILLS );
|
|
|
|
registerBiomeType(swampland, WET, SWAMP );
|
|
|
|
registerBiomeType(river, RIVER );
|
|
|
|
registerBiomeType(frozenOcean, COLD, OCEAN, SNOWY );
|
|
|
|
registerBiomeType(frozenRiver, COLD, RIVER, SNOWY );
|
|
|
|
registerBiomeType(icePlains, COLD, SNOWY, WASTELAND );
|
|
|
|
registerBiomeType(iceMountains, COLD, SNOWY, MOUNTAIN );
|
|
|
|
registerBiomeType(beach, BEACH );
|
|
|
|
registerBiomeType(desertHills, HOT, DRY, SANDY, HILLS );
|
|
|
|
registerBiomeType(jungle, HOT, WET, DENSE, JUNGLE );
|
|
|
|
registerBiomeType(jungleHills, HOT, WET, DENSE, JUNGLE, HILLS);
|
|
|
|
registerBiomeType(forestHills, FOREST, HILLS );
|
|
|
|
registerBiomeType(sky, COLD, DRY, END );
|
|
|
|
registerBiomeType(hell, HOT, DRY, NETHER );
|
|
|
|
registerBiomeType(mushroomIsland, MUSHROOM );
|
|
|
|
registerBiomeType(extremeHillsEdge, MOUNTAIN );
|
|
|
|
registerBiomeType(mushroomIslandShore, MUSHROOM, BEACH );
|
|
|
|
registerBiomeType(jungleEdge, HOT, WET, JUNGLE, FOREST );
|
|
|
|
registerBiomeType(deepOcean, OCEAN );
|
|
|
|
registerBiomeType(stoneBeach, BEACH );
|
|
|
|
registerBiomeType(coldBeach, COLD, BEACH, SNOWY );
|
|
|
|
registerBiomeType(birchForest, FOREST );
|
|
|
|
registerBiomeType(birchForestHills, FOREST, HILLS );
|
|
|
|
registerBiomeType(roofedForest, SPOOKY, DENSE, FOREST );
|
|
|
|
registerBiomeType(coldTaiga, COLD, CONIFEROUS, FOREST, SNOWY );
|
|
|
|
registerBiomeType(coldTaigaHills, COLD, CONIFEROUS, FOREST, SNOWY, HILLS);
|
|
|
|
registerBiomeType(megaTaiga, COLD, CONIFEROUS, FOREST );
|
|
|
|
registerBiomeType(megaTaigaHills, COLD, CONIFEROUS, FOREST, HILLS );
|
|
|
|
registerBiomeType(extremeHillsPlus, MOUNTAIN, FOREST, SPARSE );
|
|
|
|
registerBiomeType(savanna, HOT, SAVANNA, PLAINS, SPARSE );
|
|
|
|
registerBiomeType(savannaPlateau, HOT, SAVANNA, PLAINS, SPARSE );
|
|
|
|
registerBiomeType(mesa, MESA, SANDY );
|
|
|
|
registerBiomeType(mesaPlateau_F, MESA, SPARSE, SANDY );
|
|
|
|
registerBiomeType(mesaPlateau, MESA, SANDY );
|
Pulled Biome Tag System by Emasher, Closes #433
An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed.
A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it.
Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit.
2013-04-05 00:55:35 +00:00
|
|
|
}
|
2013-04-19 11:08:53 +00:00
|
|
|
}
|