Add support for server side only recipes, as well as detection of vanilla client recipe book filter to prevent errors.

This commit is contained in:
LexManos committed 2017-08-15 05:10:07 -07:00
1 parent ee27276ba2
commit 28e341002f
14 files changed
+168 -55

No files matched your search

@@ -76,7 +76,7 @@ public class RegistryManager
<V extends IForgeRegistryEntry<V>> ForgeRegistry<V> createRegistry(ResourceLocation name, Class<V> type, ResourceLocation defaultKey, int min, int max,
@Nullable AddCallback<V> add, @Nullable ClearCallback<V> clear, @Nullable CreateCallback<V> create,
boolean persisted, boolean allowOverrides, boolean isModifiable, @Nullable DummyFactory<V> dummyFactory)
boolean persisted, boolean allowOverrides, boolean isModifiable, @Nullable DummyFactory<V> dummyFactory, @Nullable MissingFactory<V> missing)
{
Set<Class<?>> parents = Sets.newHashSet();
findSuperTypes(type, parents);
@@ -87,7 +87,7 @@ public class RegistryManager
FMLLog.log.error("Found existing registry of type {} named {}, you cannot create a new registry ({}) with type {}, as {} has a parent of that type", foundType, superTypes.get(foundType), name, type, type);
throw new IllegalArgumentException("Duplicate registry parent type found - you can only have one registry for a particular super type");
}
ForgeRegistry<V> reg = new ForgeRegistry<V>(type, defaultKey, min, max, create, add, clear, this, allowOverrides, isModifiable, dummyFactory);
ForgeRegistry<V> reg = new ForgeRegistry<V>(type, defaultKey, min, max, create, add, clear, this, allowOverrides, isModifiable, dummyFactory, missing);
registries.put(name, reg);
superTypes.put(type, name);
if (persisted)