mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Make ReverseTagWrapper unmodifiable, fix error in log when mods folder doesn't exist initial scan.
This commit is contained in:
1 parent
604987a005
commit
002e29958e
2 files changed
+4
-2
No files matched your search
@@ -19,6 +19,7 @@
|
||||
|
||||
package net.minecraftforge.common.util;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.IntSupplier;
|
||||
@@ -47,7 +48,7 @@ public class ReverseTagWrapper<T>
|
||||
{
|
||||
if (cache == null || generation != genSupplier.getAsInt())
|
||||
{
|
||||
this.cache = new HashSet<>(colSupplier.get().getOwningTags(target));
|
||||
this.cache = Collections.unmodifiableSet(new HashSet<>(colSupplier.get().getOwningTags(target)));
|
||||
this.generation = genSupplier.getAsInt();
|
||||
}
|
||||
return this.cache;
|
||||
|
||||
Reference in new issue
Block a user