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:51:51 -07:00
1 parent 56abf84881
commit 82696a8a76
4 files changed
+152 -58

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))
{