From cf6decae7005a5c55e69fdc5c81b6322f96f919d Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:36:50 -0500 Subject: [PATCH] Removed redundant accessor --- .../turniplabs/halplibe/helper/EntityHelper.java | 4 ++-- .../mixin/accessors/EntityListAccessor.java | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java diff --git a/src/main/java/turniplabs/halplibe/helper/EntityHelper.java b/src/main/java/turniplabs/halplibe/helper/EntityHelper.java index 46b5c1b..3aab130 100644 --- a/src/main/java/turniplabs/halplibe/helper/EntityHelper.java +++ b/src/main/java/turniplabs/halplibe/helper/EntityHelper.java @@ -6,7 +6,7 @@ import net.minecraft.client.render.tileentity.TileEntityRenderer; import net.minecraft.core.block.entity.TileEntity; import net.minecraft.core.entity.Entity; -import turniplabs.halplibe.mixin.accessors.EntityListAccessor; +import net.minecraft.core.entity.EntityDispatcher; import turniplabs.halplibe.mixin.accessors.RenderManagerAccessor; import turniplabs.halplibe.mixin.accessors.TileEntityAccessor; import turniplabs.halplibe.mixin.accessors.TileEntityRendererAccessor; @@ -44,7 +44,7 @@ public static void createSpecialTileEntity(Class clazz, Ti */ public static class Core { public static void createEntity(Class clazz, int id, String name) { - EntityListAccessor.callAddMapping(clazz, name, id); + EntityDispatcher.addMapping(clazz, name, id); } public static void createTileEntity(Class clazz, String name) { TileEntityAccessor.callAddMapping(clazz, name); diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java deleted file mode 100644 index 0c6fb6d..0000000 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java +++ /dev/null @@ -1,14 +0,0 @@ -package turniplabs.halplibe.mixin.accessors; - -import net.minecraft.core.entity.Entity; -import net.minecraft.core.entity.EntityDispatcher; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@Mixin(value = EntityDispatcher.class, remap = false) -public interface EntityListAccessor { - @Invoker("addMapping") - static void callAddMapping(Class clazz, String name, int id) { - throw new AssertionError(); - } -}