Threadsafe biome add

This commit is contained in:
Frank 2023-06-08 09:39:41 +02:00
parent 2a6f62a0b9
commit a95843d051

View file

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