mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 18:45:09 +00:00
Store object holder handlers per registry name (#10899)
Co-authored-by: LexManos <[email protected]>
This commit is contained in:
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))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user