Disabled JavaModernSyntaxSupport

This commit is contained in:
Goodbird committed 2024-04-15 22:08:38 +03:00
1 parent d9ee1bd10a
commit 574858716d
4 files changed
+16 -17

No files matched your search

@@ -3,6 +3,7 @@ package com.goodbird.npcgecko.mixin.impl;
import com.goodbird.npcgecko.entity.EntityCustomModel;
import com.goodbird.npcgecko.mixin.IDataDisplay;
import com.goodbird.npcgecko.utils.NpcTextureUtils;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import kamkeel.addon.GeckoAddon;
@@ -27,7 +28,9 @@ public class MixinGeckoAddon {
if(!supportEnabled)
return;
if (entity instanceof EntityCustomModel modelEntity && copied instanceof EntityNPCInterface npc) {
if (entity instanceof EntityCustomModel && copied instanceof EntityNPCInterface) {
EntityCustomModel modelEntity = (EntityCustomModel) entity;
EntityNPCInterface npc = (EntityNPCInterface) copied;
IDataDisplay display = (IDataDisplay) npc.display;
modelEntity.textureResLoc = NpcTextureUtils.getNpcTexture((EntityNPCInterface) copied);
modelEntity.modelResLoc = new ResourceLocation(display.getCustomModelData().getModel());