From b6fec985e0297a754ba5d0539b13ec782c388d37 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 1 Feb 2021 15:56:23 +0000 Subject: [PATCH] Added double helix options to artifacts --- .../ecoenchants/enchantments/itemtypes/Artifact.java | 7 +++++++ .../src/main/resources/enchants/artifact/ashartifact.yml | 1 + .../main/resources/enchants/artifact/cloudsartifact.yml | 1 + .../main/resources/enchants/artifact/crimsonartifact.yml | 1 + .../main/resources/enchants/artifact/damageartifact.yml | 1 + .../main/resources/enchants/artifact/dragonartifact.yml | 1 + .../src/main/resources/enchants/artifact/dustartifact.yml | 1 + .../main/resources/enchants/artifact/emeraldartifact.yml | 1 + .../resources/enchants/artifact/enchantmentartifact.yml | 1 + .../src/main/resources/enchants/artifact/endartifact.yml | 1 + .../src/main/resources/enchants/artifact/fireartifact.yml | 1 + .../src/main/resources/enchants/artifact/heartartifact.yml | 1 + .../src/main/resources/enchants/artifact/honeyartifact.yml | 1 + .../src/main/resources/enchants/artifact/inkartifact.yml | 1 + .../src/main/resources/enchants/artifact/lavaartifact.yml | 1 + .../src/main/resources/enchants/artifact/limeartifact.yml | 1 + .../src/main/resources/enchants/artifact/magicartifact.yml | 1 + .../src/main/resources/enchants/artifact/magmaartifact.yml | 1 + .../src/main/resources/enchants/artifact/musicartifact.yml | 1 + .../main/resources/enchants/artifact/netherartifact.yml | 1 + .../main/resources/enchants/artifact/redstoneartifact.yml | 1 + .../src/main/resources/enchants/artifact/smokeartifact.yml | 1 + .../src/main/resources/enchants/artifact/snowartifact.yml | 1 + .../src/main/resources/enchants/artifact/soulartifact.yml | 1 + .../main/resources/enchants/artifact/soulfireartifact.yml | 1 + .../main/resources/enchants/artifact/sparkleartifact.yml | 1 + .../src/main/resources/enchants/artifact/tearartifact.yml | 1 + .../src/main/resources/enchants/artifact/totemartifact.yml | 1 + .../main/resources/enchants/artifact/warpedartifact.yml | 1 + .../src/main/resources/enchants/artifact/waterartifact.yml | 1 + .../src/main/resources/enchants/artifact/witchartifact.yml | 1 + .../src/main/resources/enchants/artifact/zapartifact.yml | 1 + 32 files changed, 38 insertions(+) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/itemtypes/Artifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/itemtypes/Artifact.java index fd9bef47..d54c5074 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/itemtypes/Artifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/itemtypes/Artifact.java @@ -160,6 +160,8 @@ public abstract class Artifact extends EcoEnchant { double radiusMultiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "radius-multiplier"); double offset = NumberUtils.randFloat(0, 0.75); + boolean doubleHelix = this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "use-double-helix"); + this.getPlugin().getRunnableFactory().create(bukkitRunnable -> { for (int i = 0; i < 3; i++) { if (yAtomic.get() > entity.getHeight()) { @@ -172,6 +174,11 @@ public abstract class Artifact extends EcoEnchant { Location particleLocation = entity.getLocation(); particleLocation.add(x, y, z); entity.getWorld().spawnParticle(particle, particleLocation, 1, 0, 0, 0, 0, extra, false); + if (doubleHelix) { + Location particleLocation2 = entity.getLocation(); + particleLocation2.add(-x, y, -z); + entity.getWorld().spawnParticle(particle, particleLocation2, 1, 0, 0, 0, 0, extra, false); + } } }).runTaskTimer(0, 1); } diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/ashartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/ashartifact.yml index c5920953..bc66537c 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/ashartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/ashartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/cloudsartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/cloudsartifact.yml index 070d02d9..872575b1 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/cloudsartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/cloudsartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/crimsonartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/crimsonartifact.yml index 7280cba7..ecdeacc9 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/crimsonartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/crimsonartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/damageartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/damageartifact.yml index ebce7b7c..a87fa0a9 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/damageartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/damageartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/dragonartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/dragonartifact.yml index 4a53ef63..ce038cf7 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/dragonartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/dragonartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/dustartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/dustartifact.yml index f904cba6..b3c54d3c 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/dustartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/dustartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/emeraldartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/emeraldartifact.yml index 1b31bbb7..6d0666b6 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/emeraldartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/emeraldartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/enchantmentartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/enchantmentartifact.yml index f738205e..86aaa882 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/enchantmentartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/enchantmentartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/endartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/endartifact.yml index d02f8df6..630c80fd 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/endartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/endartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/fireartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/fireartifact.yml index 8be61e11..6137df67 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/fireartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/fireartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/heartartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/heartartifact.yml index 11c04588..656ec97a 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/heartartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/heartartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/honeyartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/honeyartifact.yml index 5286f9a9..1078a20d 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/honeyartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/honeyartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false| # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/inkartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/inkartifact.yml index fbc227f7..b1fc681d 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/inkartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/inkartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/lavaartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/lavaartifact.yml index 3438b041..63913341 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/lavaartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/lavaartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/limeartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/limeartifact.yml index c983a898..b630d252 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/limeartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/limeartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/magicartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/magicartifact.yml index c623e186..f9a78371 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/magicartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/magicartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/magmaartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/magmaartifact.yml index 156808b5..5868e8ca 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/magmaartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/magmaartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/musicartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/musicartifact.yml index 31677b8e..0af0b688 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/musicartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/musicartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/netherartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/netherartifact.yml index e6117a6a..b362f43f 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/netherartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/netherartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/redstoneartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/redstoneartifact.yml index b05bfc98..f9b8f295 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/redstoneartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/redstoneartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/smokeartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/smokeartifact.yml index c71129c7..b341c70d 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/smokeartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/smokeartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/snowartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/snowartifact.yml index 4933801d..78512ccb 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/snowartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/snowartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/soulartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/soulartifact.yml index 246fb412..7ff2b1f5 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/soulartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/soulartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/soulfireartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/soulfireartifact.yml index b727d0da..b7bc267f 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/soulfireartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/soulfireartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/sparkleartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/sparkleartifact.yml index 6a037f29..404308c9 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/sparkleartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/sparkleartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/tearartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/tearartifact.yml index 284341b0..cf04fa57 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/tearartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/tearartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/totemartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/totemartifact.yml index a5781935..cb9cd3bf 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/totemartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/totemartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/warpedartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/warpedartifact.yml index 4d26a2fc..76a956a2 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/warpedartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/warpedartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/waterartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/waterartifact.yml index 366149a3..d7f24625 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/waterartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/waterartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/witchartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/witchartifact.yml index 9ee05e33..d25c86bd 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/witchartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/witchartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2 diff --git a/eco-core/core-plugin/src/main/resources/enchants/artifact/zapartifact.yml b/eco-core/core-plugin/src/main/resources/enchants/artifact/zapartifact.yml index 3e6ce125..faaf2b59 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/artifact/zapartifact.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/artifact/zapartifact.yml @@ -30,6 +30,7 @@ config: radius: 1 y-delta: 0.07 radius-multiplier: 5 + use-double-helix: false # For Arrows + Tridents particle-tick-delay: 2