aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java
diff options
context:
space:
mode:
authorAnthony Hilyard <anthony.hilyard@gmail.com>2022-06-14 22:24:22 -0700
committerAnthony Hilyard <anthony.hilyard@gmail.com>2022-06-14 22:24:22 -0700
commitee81f0ac1cb848609a755a875f5df0f5d51fa881 (patch)
tree76522b793e92f971f324be7935710c4b3b59ba1f /src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java
parent15a3b944d13e54f4241df78b199403d414b9bd69 (diff)
downloadIceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.tar.gz
Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.tar.bz2
Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.zip
Initial port to 1.19.
Disabled Config Menus for Forge support until it has a 1.19 version. Disabled AutoRegistry since Forge broke it.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java b/src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java
index 1b0a053..89d096a 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/registry/RendererRegistrar.java
@@ -1,36 +1,36 @@
-package com.anthonyhilyard.iceberg.registry;
+// package com.anthonyhilyard.iceberg.registry;
-import java.util.HashMap;
-import java.util.Map;
+// import java.util.HashMap;
+// import java.util.Map;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.client.renderer.entity.EntityRendererProvider;
-import net.minecraftforge.client.event.EntityRenderersEvent;
+// import net.minecraft.world.entity.Entity;
+// import net.minecraft.world.entity.EntityType;
+// import net.minecraft.client.renderer.entity.EntityRendererProvider;
+// import net.minecraftforge.client.event.EntityRenderersEvent;
-public abstract class RendererRegistrar
-{
- private static Map<EntityType<? extends Entity>, EntityRendererProvider<?>> entityRenderers = new HashMap<>();
+// public abstract class RendererRegistrar
+// {
+// private static Map<EntityType<? extends Entity>, EntityRendererProvider<?>> entityRenderers = new HashMap<>();
- protected static <T extends Entity> void registerRenderer(String name, EntityRendererProvider<T> rendererProvider)
- {
- if (AutoRegistry.isEntityTypeRegistered(name))
- {
- // Store this renderer provider.
- entityRenderers.put(AutoRegistry.getEntityType(name), rendererProvider);
- }
- else
- {
- throw new RuntimeException("Tried to register a renderer for an unregistered entity type! Make sure you register renderers after entities.");
- }
- }
+// protected static <T extends Entity> void registerRenderer(String name, EntityRendererProvider<T> rendererProvider)
+// {
+// if (AutoRegistry.isEntityTypeRegistered(name))
+// {
+// // Store this renderer provider.
+// entityRenderers.put(AutoRegistry.getEntityType(name), rendererProvider);
+// }
+// else
+// {
+// throw new RuntimeException("Tried to register a renderer for an unregistered entity type! Make sure you register renderers after entities.");
+// }
+// }
- @SuppressWarnings({"unchecked", "unused"})
- private <T extends Entity> void onEntityCreation(EntityRenderersEvent.RegisterRenderers event)
- {
- for (EntityType<? extends Entity> entityType : entityRenderers.keySet())
- {
- event.registerEntityRenderer((EntityType<T>)entityType, (EntityRendererProvider<T>)entityRenderers.get(entityType));
- }
- }
-}
+// @SuppressWarnings({"unchecked", "unused"})
+// private <T extends Entity> void onEntityCreation(EntityRenderersEvent.RegisterRenderers event)
+// {
+// for (EntityType<? extends Entity> entityType : entityRenderers.keySet())
+// {
+// event.registerEntityRenderer((EntityType<T>)entityType, (EntityRendererProvider<T>)entityRenderers.get(entityType));
+// }
+// }
+// }