Skip to content

Commit

Permalink
rm: 彻底移除GhastMorphSkill
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Oct 29, 2023
1 parent d5d0f7b commit 9629651
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static void addSkillConfigurations(List<SkillAbilityConfiguration> skills
addSkillConfiguration(skills, EntityType.WITHER, 10, SkillType.LAUNCH_PROJECTIVE, c ->
c.addOption(SkillType.LAUNCH_PROJECTIVE, new ProjectiveConfiguration(EntityType.WITHER_SKULL, 1, "entity.wither.shoot", 24)));

addSkillConfiguration(skills, EntityType.GHAST, DisguiseUtils.GHAST_EXECUTE_DELAY + 40, SkillType.GHAST, c ->
addSkillConfiguration(skills, EntityType.GHAST, DisguiseUtils.GHAST_EXECUTE_DELAY + 40, SkillType.LAUNCH_PROJECTIVE, c ->
c.addOption(SkillType.LAUNCH_PROJECTIVE, new ProjectiveConfiguration(EntityType.FIREBALL, 1, "entity.ghast.shoot", 35)
.withDelay(DisguiseUtils.GHAST_EXECUTE_DELAY)
.withWarningSound("entity.ghast.warn")));
Expand Down
1 change: 0 additions & 1 deletion src/main/java/xiamomc/morph/skills/MorphSkillHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ private void load()
new SonicBoomMorphSkill(),
new SplashPotionSkill(),

new GhastMorphSkill(),
NoneMorphSkill.instance
));

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/xiamomc/morph/skills/SkillType.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ public class SkillType
public static final NamespacedKey TELEPORT = new NamespacedKey(nameSpace, "teleport");
public static final NamespacedKey EVOKER = new NamespacedKey(nameSpace, "evoker");
public static final NamespacedKey SONIC_BOOM = new NamespacedKey(nameSpace, "sonic_boom");

@Deprecated(forRemoval = true)
public static final NamespacedKey GHAST = new NamespacedKey(nameSpace, "launch_projective_ghast");

public static final NamespacedKey WITCH = new NamespacedKey(nameSpace, "witch");

public static final NamespacedKey UNKNOWN = new NamespacedKey(nameSpace, "unknown");
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/xiamomc/morph/skills/impl/GhastMorphSkill.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -230,24 +230,6 @@ private boolean migrate(SkillAbilityConfigurationContainer config)

}

//恶魂的技能变成延迟释放
if (version < 12)
{
var targetConfig = getConfigFor(EntityType.GHAST, config);

if (targetConfig != null)
{
if (targetConfig.getSkillIdentifier().equals(SkillType.LAUNCH_PROJECTIVE))
{
if (targetConfig.getCooldown() == 40)
targetConfig.setCooldown(DisguiseUtils.GHAST_EXECUTE_DELAY + 40);

targetConfig.setSkillIdentifier(SkillType.GHAST);
targetConfig.moveOption(SkillType.LAUNCH_PROJECTIVE, SkillType.GHAST);
}
}
}

//马匹被动改成更改属性
if (version < 13)
{
Expand All @@ -267,6 +249,7 @@ private boolean migrate(SkillAbilityConfigurationContainer config)

if (ghastConfig != null)
{
//noinspection removal
ghastConfig.moveOption(SkillType.GHAST, SkillType.LAUNCH_PROJECTIVE);
ghastConfig.setSkillIdentifier(SkillType.LAUNCH_PROJECTIVE);

Expand Down

0 comments on commit 9629651

Please sign in to comment.