mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-04 02:31:21 +01:00
Improved pentashot settings
This commit is contained in:
parent
b99a894324
commit
3d5e249e3a
@ -25,11 +25,11 @@ public class Succession extends EcoEnchant {
|
|||||||
@NotNull final Arrow arrow,
|
@NotNull final Arrow arrow,
|
||||||
final int level,
|
final int level,
|
||||||
@NotNull final EntityShootBowEvent event) {
|
@NotNull final EntityShootBowEvent event) {
|
||||||
int number = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "extra-arrows-per-level");
|
int amount = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "extra-arrows-per-level") * level;
|
||||||
|
|
||||||
boolean fire = EnchantChecks.mainhand(shooter, Enchantment.ARROW_FIRE);
|
boolean fire = EnchantChecks.mainhand(shooter, Enchantment.ARROW_FIRE);
|
||||||
|
|
||||||
for (int i = 1; i <= level*number; i++) {
|
for (int i = 1; i <= amount; i++) {
|
||||||
this.getPlugin().getScheduler().runLater(() -> {
|
this.getPlugin().getScheduler().runLater(() -> {
|
||||||
Arrow arrow1 = shooter.launchProjectile(Arrow.class, event.getProjectile().getVelocity());
|
Arrow arrow1 = shooter.launchProjectile(Arrow.class, event.getProjectile().getVelocity());
|
||||||
arrow1.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
|
arrow1.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
|
||||||
|
@ -24,7 +24,9 @@ public class Pentashot extends EcoEnchant {
|
|||||||
@NotNull final Arrow arrow,
|
@NotNull final Arrow arrow,
|
||||||
final int level,
|
final int level,
|
||||||
@NotNull final EntityShootBowEvent event) {
|
@NotNull final EntityShootBowEvent event) {
|
||||||
for (int i = -level; i <= level; i += 1) {
|
int bonusPerSide = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "side-arrows-per-level") * level;
|
||||||
|
|
||||||
|
for (int i = -bonusPerSide; i <= bonusPerSide; i += 1) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,8 @@ general-config:
|
|||||||
- succession
|
- succession
|
||||||
- tripleshot
|
- tripleshot
|
||||||
- buckshot
|
- buckshot
|
||||||
|
maximum-level: 1
|
||||||
|
|
||||||
config:
|
config:
|
||||||
|
side-arrows-per-level: 2 # If you want to have more levels
|
||||||
angle: 11
|
angle: 11
|
Loading…
Reference in New Issue
Block a user