More error cleanup, reinstanted IForgeReigstryEntry.

The abstract class will be used as the default, and to enable delegates but we should keep it api simple by keeping the interface.
Removed some patches that didnt get removed in the rebase.
This commit is contained in:
LexManos committed 2018-09-05 20:06:18 -07:00
1 parent ff6fa2cfaf
commit 2798080f60
35 files changed
+200 -472

No files matched your search

@@ -22,7 +22,6 @@ package net.minecraftforge.event;
import java.util.Collection;
import java.util.stream.Collectors;
import net.minecraftforge.registries.ForgeRegistryEntry;
import org.apache.commons.lang3.Validate;
import com.google.common.collect.ImmutableList;
@@ -30,12 +29,13 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.ModContainer;
import net.minecraftforge.eventbus.api.GenericEvent;
import net.minecraftforge.registries.IForgeRegistry;
import net.minecraftforge.registries.IForgeRegistryEntry;
/**
* RegistryEvent supertype.
*/
public class RegistryEvent<T extends ForgeRegistryEntry<T>> extends GenericEvent<T>
public class RegistryEvent<T extends IForgeRegistryEntry<T>> extends GenericEvent<T>
{
RegistryEvent(Class<T> clazz) {
super(clazz);
@@ -58,7 +58,7 @@ public class RegistryEvent<T extends ForgeRegistryEntry<T>> extends GenericEvent
* ObjectHolders will reload between Blocks and Items, and after all registries have been visited.
* @param <T> The registry top level type
*/
public static class Register<T extends ForgeRegistryEntry<T>> extends RegistryEvent<T>
public static class Register<T extends IForgeRegistryEntry<T>> extends RegistryEvent<T>
{
private final IForgeRegistry<T> registry;
private final ResourceLocation name;
@@ -82,7 +82,7 @@ public class RegistryEvent<T extends ForgeRegistryEntry<T>> extends GenericEvent
}
public static class MissingMappings<T extends ForgeRegistryEntry<T>> extends RegistryEvent<T>
public static class MissingMappings<T extends IForgeRegistryEntry<T>> extends RegistryEvent<T>
{
private final IForgeRegistry<T> registry;
private final ResourceLocation name;
@@ -154,7 +154,7 @@ public class RegistryEvent<T extends ForgeRegistryEntry<T>> extends GenericEvent
REMAP
}
public static class Mapping<T extends ForgeRegistryEntry<T>>
public static class Mapping<T extends IForgeRegistryEntry<T>>
{
public final IForgeRegistry<T> registry;
private final IForgeRegistry<T> pool;