From e8d72f729605a2e6465199efce0152f50aa94a1d Mon Sep 17 00:00:00 2001 From: MATRIX-feather Date: Fri, 29 Nov 2024 21:58:02 +0800 Subject: [PATCH] =?UTF-8?q?misc:=20=E6=8E=92=E9=99=A4=20CREAKING=5FTRANSIE?= =?UTF-8?q?NT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xyz/nifeather/morph/events/CommonEventProcessor.java | 8 +++++++- .../morph/providers/disguise/VanillaDisguiseProvider.java | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java b/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java index 227aa978..891ee098 100644 --- a/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java +++ b/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java @@ -618,6 +618,12 @@ private void onPlayerKillEntity(Player player, Entity entity) if (entity instanceof Player targetPlayer) morphs.grantMorphToPlayer(player, DisguiseTypes.PLAYER.toId(targetPlayer.getName())); else - morphs.grantMorphToPlayer(player, entity.getType().getKey().asString()); + { + var type = entity.getType(); + if (type == EntityType.CREAKING_TRANSIENT) + type = EntityType.CREAKING; + + morphs.grantMorphToPlayer(player, type.getKey().asString()); + } } } diff --git a/src/main/java/xyz/nifeather/morph/providers/disguise/VanillaDisguiseProvider.java b/src/main/java/xyz/nifeather/morph/providers/disguise/VanillaDisguiseProvider.java index f182e8ab..39052869 100644 --- a/src/main/java/xyz/nifeather/morph/providers/disguise/VanillaDisguiseProvider.java +++ b/src/main/java/xyz/nifeather/morph/providers/disguise/VanillaDisguiseProvider.java @@ -77,7 +77,7 @@ public VanillaDisguiseProvider() for (var eT : EntityType.values()) { - if (eT == EntityType.UNKNOWN || !eT.isAlive()) continue; + if (eT == EntityType.UNKNOWN || eT == EntityType.CREAKING_TRANSIENT || !eT.isAlive()) continue; list.add(eT.getKey().getKey()); }