Store object holder handlers per registry name (#10899)

Co-authored-by: LexManos <[email protected]>
This commit is contained in:
BonsUnleashedandLexManos authored and LexManos committed 2026-10-12 17:29:50 -07:00
1 parent 82f7d4311e
commit abf2889b11
4 files changed
+145 -48

No files matched your search

@@ -19,7 +19,7 @@ import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.Nullable;
@SuppressWarnings("rawtypes")
class ObjectHolderRef implements Consumer<Predicate<ResourceLocation>>
class ObjectHolderRef implements Consumer<Predicate<ResourceLocation>>, Runnable
{
private static final Logger LOGGER = LogManager.getLogger();
private final Field field;
@@ -87,7 +87,12 @@ class ObjectHolderRef implements Consumer<Predicate<ResourceLocation>>
{
if (registry == null || !filter.test(registry.getRegistryName()))
return;
run();
}
@Override
public void run()
{
Object thing;
if (registry.containsKey(injectedObject))
{