mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-01 22:22:10 +00:00
fix: EntityCount -> ProjectileCount
This commit is contained in:
1 parent
ade7852210
commit
63d6e722b5
7 files changed
+44
-27
No files matched your search
@@ -17,7 +17,7 @@ import org.bukkit.util.Vector;
|
||||
public class EntityProjectile extends SiegeEngineProjectile {
|
||||
|
||||
// Defaults
|
||||
public int entityCount = 20;
|
||||
public int projectileCount = 20;
|
||||
public int arrowOnlyDamage = 6;
|
||||
public Boolean delayedFire = false;
|
||||
public int delayTime = 6;
|
||||
@@ -40,7 +40,7 @@ public class EntityProjectile extends SiegeEngineProjectile {
|
||||
public void Shoot(Entity player, Entity entity, Location FireLocation, Float velocity) {
|
||||
playSound = true;
|
||||
int baseDelay = 0;
|
||||
for (int i = 0; i < entityCount; i++) {
|
||||
for (int i = 0; i < projectileCount; i++) {
|
||||
if (delayedFire) {
|
||||
baseDelay += delayTime;
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(SiegeEngines.getInstance(), () -> {
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.bukkit.util.Vector;
|
||||
public class FireworkProjectile extends SiegeEngineProjectile {
|
||||
|
||||
// Defaults
|
||||
public int entityCount = 1;
|
||||
public int projectileCount = 1;
|
||||
public Boolean delayedFire = true;
|
||||
public int delayTime = 6;
|
||||
public EntityType entityType = EntityType.FIREWORK;
|
||||
@@ -36,7 +36,7 @@ public class FireworkProjectile extends SiegeEngineProjectile {
|
||||
|
||||
public static FireworkProjectile getDefaultRocketShot(ItemStack rocketItem) {
|
||||
FireworkProjectile fireProj = new FireworkProjectile(rocketItem);
|
||||
fireProj.entityCount = 1;
|
||||
fireProj.projectileCount = 1;
|
||||
fireProj.entityType = EntityType.FIREWORK;
|
||||
fireProj.particleType = Particle.WHITE_ASH;
|
||||
fireProj.soundType = Sound.ENTITY_FIREWORK_ROCKET_BLAST_FAR;
|
||||
@@ -48,7 +48,7 @@ public class FireworkProjectile extends SiegeEngineProjectile {
|
||||
public void Shoot(Entity player, Entity entity, Location FireLocation, Float velocity) {
|
||||
playSound = true;
|
||||
int baseDelay = 0;
|
||||
for (int i = 0; i < entityCount; i++) {
|
||||
for (int i = 0; i < projectileCount; i++) {
|
||||
if (delayedFire) {
|
||||
baseDelay += delayTime;
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(SiegeEngines.getInstance(), () -> {
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.github.alathra.siegeengines.Util.SiegeEnginesUtil;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
@@ -14,13 +13,11 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class PotionProjectile extends SiegeEngineProjectile {
|
||||
|
||||
public int entityCount = 3;
|
||||
public int projectileCount = 3;
|
||||
public Boolean delayedFire = false;
|
||||
public int delayTime = 6;
|
||||
public float inaccuracy = 0.1f;
|
||||
@@ -36,7 +33,7 @@ public class PotionProjectile extends SiegeEngineProjectile {
|
||||
public void Shoot(Entity player, Entity entity, Location loc, Float velocity) {
|
||||
//TODO Auto-generated method stub
|
||||
int baseDelay = 0;
|
||||
for (int i = 0; i < entityCount; i++) {
|
||||
for (int i = 0; i < projectileCount; i++) {
|
||||
if (delayedFire) {
|
||||
baseDelay += delayTime;
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(SiegeEngines.getInstance(), () -> {
|
||||
|
||||
Reference in new issue
Block a user