mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-02 14:38:55 +00:00
refactor
This commit is contained in:
1 parent
c7587c7ea8
commit
b159cd799e
12 files changed
+31
-18
No files matched your search
@@ -62,7 +62,7 @@ public class ClickHandler implements Listener {
|
||||
// world.createExplosion(loc, proj.Radius, proj.DoFire);
|
||||
Entity tnt = event.getEntity().getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);
|
||||
TNTPrimed tntEnt = (TNTPrimed) tnt;
|
||||
tntEnt.setYield(proj.Radius);
|
||||
tntEnt.setYield(proj.ExplodePower);
|
||||
tntEnt.setFuseTicks(0);
|
||||
|
||||
|
||||
|
||||
@@ -123,16 +123,16 @@ public class CrunchSiegeCore extends JavaPlugin {
|
||||
public static void AddDefined() {
|
||||
SiegeEquipment equip = new SiegeEquipment();
|
||||
ExplosiveProjectile proj = new ExplosiveProjectile();
|
||||
proj.Radius = 1;
|
||||
proj.ExplodePower = 1;
|
||||
equip.Projectiles.put(Material.COBBLESTONE, proj);
|
||||
proj = new ExplosiveProjectile();
|
||||
proj.Radius = 1;
|
||||
proj.ProjectilesCount = 50;
|
||||
proj.ExplodePower = 1;
|
||||
proj.ProjectilesCount = 3;
|
||||
proj.DelayedFire = true;
|
||||
proj.Inaccuracy = 0.3f;
|
||||
proj.Inaccuracy = 0.5f;
|
||||
equip.Projectiles.put(Material.TNT, proj);
|
||||
proj = new ExplosiveProjectile();
|
||||
proj.Radius = 4;
|
||||
proj.ExplodePower = 4;
|
||||
proj.ProjectilesCount = 1;
|
||||
equip.Projectiles.put(Material.COPPER_BLOCK, proj);
|
||||
equip.Projectiles.put(Material.GRAVEL, new EntityProjectile());
|
||||
|
||||
@@ -184,7 +184,7 @@ public class SiegeEquipment implements Cloneable {
|
||||
// player.sendMessage("" + modelData);
|
||||
CrunchSiegeCore.UpdateEntityIdModel(this.Entity, modelData, this.WorldName);
|
||||
if (modelData == this.ModelNumberToFireAt) {
|
||||
Projectiles.get(LoadedProjectile).Shoot(player, this.Entity, loc, loadedFuel * this.VelocityPerFuel);
|
||||
Projectiles.get(LoadedProjectile).Shoot(player, this.Entity, XOffset, YOffset, loadedFuel * this.VelocityPerFuel);
|
||||
}
|
||||
this.NextModelNumber += 1;
|
||||
|
||||
@@ -210,7 +210,7 @@ public class SiegeEquipment implements Cloneable {
|
||||
|
||||
// player.sendMessage("Cannot fire for another " + CrunchSiegeCore.convertTime(this.NextShotTime - System.currentTimeMillis()));
|
||||
|
||||
Projectiles.get(LoadedProjectile).Shoot(player, this.Entity, loc, loadedFuel * this.VelocityPerFuel);
|
||||
Projectiles.get(LoadedProjectile).Shoot(player, this.Entity, XOffset, YOffset, loadedFuel * this.VelocityPerFuel);
|
||||
}, (long) delay);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user