Threadsafe biome add
This commit is contained in:
parent
2a6f62a0b9
commit
a95843d051
1 changed files with 13 additions and 11 deletions
|
@ -98,6 +98,7 @@ public class TagRegistry<T> {
|
|||
*/
|
||||
public void add(TagKey<Biome> tagID, ResourceKey<Biome>... elements) {
|
||||
if (isFrozen) WorldsTogether.LOGGER.warning("Adding Tag " + tagID + " after the API was frozen.");
|
||||
synchronized (this) {
|
||||
Set<TagEntry> set = getSetForTag(tagID);
|
||||
for (ResourceKey<Biome> element : elements) {
|
||||
ResourceLocation id = element.location();
|
||||
|
@ -114,6 +115,7 @@ public class TagRegistry<T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TagKey<Biome> makeStructureTag(String modID, String name) {
|
||||
return makeTag(modID, "has_structure/" + name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue