Skip to content

Commit

Permalink
Merge branch '1.20.2' into client-renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Oct 30, 2023
2 parents 726d3d7 + 493537c commit 2fa1449
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 36 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_version=0.13.1
project_version=0.13.3

# FM Protocols
protocols_version=8aeff50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ private static SkillAbilityConfiguration addSkillConfiguration(List<SkillAbility
if (cfg == null) config = new SkillAbilityConfiguration(mobId, cd, skillIdentifier);
else config = cfg;

config.setCooldown(cd);
config.setSkillIdentifier(skillIdentifier);
config.setIdentifier(mobId);

if (c != null)
c.accept(config);

Expand Down Expand Up @@ -163,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 2fa1449

Please sign in to comment.