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

@@ -98,19 +98,15 @@ public class EntityCustomModel extends EntityCreature implements IAnimatable, IA
dialogAnim = new AnimationBuilder().playOnce(name);
}
public void activateReceivedAnim(EnumSyncAutoAnim type) {
switch (type) {
case HURT -> {
if(!hurtAnimName.isEmpty())
hurtAnim = new AnimationBuilder().playOnce(hurtAnimName);
}
case MELEE_ATTACK -> {
if(!meleeAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(meleeAttackAnimName);
}
case RANGED_ATTACK -> {
if(!rangedAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(rangedAttackAnimName);
}
if(type == EnumSyncAutoAnim.HURT){
if(!hurtAnimName.isEmpty())
hurtAnim = new AnimationBuilder().playOnce(hurtAnimName);
}else if(type == EnumSyncAutoAnim.MELEE_ATTACK){
if(!meleeAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(meleeAttackAnimName);
}else if(type == EnumSyncAutoAnim.RANGED_ATTACK){
if(!rangedAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(rangedAttackAnimName);
}
}
@@ -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());