mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-04 14:38:53 +00:00
Merge branch 'main' into sherman
This commit is contained in:
commit
65650528b2
3 files changed
+85
-18
No files matched your search
@@ -125,6 +125,28 @@ public class SiegeEngines extends JavaPlugin {
|
|||||||
trebuchet.cycleThroughModelsBeforeFiring = true;
|
trebuchet.cycleThroughModelsBeforeFiring = true;
|
||||||
definedSiegeEngines.put(trebuchet.readyModelNumber, trebuchet);
|
definedSiegeEngines.put(trebuchet.readyModelNumber, trebuchet);
|
||||||
|
|
||||||
|
// Ballista
|
||||||
|
SiegeEngine ballista = new SiegeEngine("Ballista", Config.ballistaProjectiles, new ItemStack(Material.GUNPOWDER), 143);
|
||||||
|
// config options
|
||||||
|
ballista.shotAmount = Config.ballistaShotAmount;
|
||||||
|
ballista.velocityPerFuel = Config.ballistaVelocityPerFuel;
|
||||||
|
ballista.maxFuel = Config.ballistaMaxFuel;
|
||||||
|
ballista.fuelItem = new ItemStack(Config.ballistaFuelItem);
|
||||||
|
ballista.projectiles = Config.ballistaProjectiles;
|
||||||
|
|
||||||
|
ballista.xOffset = 1;
|
||||||
|
ballista.yOffset = 1;
|
||||||
|
ballista.placementOffsetY = -0.75;
|
||||||
|
ballista.rotateStandHead = true;
|
||||||
|
ballista.rotateSideways = true;
|
||||||
|
ballista.readyModelNumber = 145;
|
||||||
|
ballista.modelNumberToFireAt = 143;
|
||||||
|
ballista.firingModelNumbers = new ArrayList<>(Arrays.asList(
|
||||||
|
143, 144, 145
|
||||||
|
));
|
||||||
|
ballista.cycleThroughModelsBeforeFiring = true;
|
||||||
|
definedSiegeEngines.put(ballista.readyModelNumber, ballista);
|
||||||
|
|
||||||
// Siege Cannon
|
// Siege Cannon
|
||||||
SiegeEngine siegeCannon = new SiegeEngine("Siege Cannon", Config.siegeCannonProjectiles, new ItemStack(Material.GUNPOWDER), 141);
|
SiegeEngine siegeCannon = new SiegeEngine("Siege Cannon", Config.siegeCannonProjectiles, new ItemStack(Material.GUNPOWDER), 141);
|
||||||
// config options
|
// config options
|
||||||
|
|||||||
@@ -33,23 +33,29 @@ public class Config {
|
|||||||
// Siege Engine Options - Defaults
|
// Siege Engine Options - Defaults
|
||||||
public static int trebuchetShotAmount = 1;
|
public static int trebuchetShotAmount = 1;
|
||||||
public static float trebuchetVelocityPerFuel = 0.3f;
|
public static float trebuchetVelocityPerFuel = 0.3f;
|
||||||
public static int trebuchetMaxFuel = 5;
|
public static int trebuchetMaxFuel = 3;
|
||||||
public static Material trebuchetFuelItem = Material.STRING;
|
public static Material trebuchetFuelItem = Material.STRING;
|
||||||
|
public static HashMap<ItemStack, SiegeEngineProjectile> trebuchetProjectiles = new HashMap<>();
|
||||||
|
|
||||||
|
public static int ballistaShotAmount = 1;
|
||||||
|
public static float ballistaVelocityPerFuel = 0.925f;
|
||||||
|
public static int ballistaMaxFuel = 4;
|
||||||
|
public static Material ballistaFuelItem = Material.STRING;
|
||||||
|
public static HashMap<ItemStack, SiegeEngineProjectile> ballistaProjectiles = new HashMap<>();
|
||||||
|
|
||||||
public static int siegeCannonShotAmount = 1;
|
public static int siegeCannonShotAmount = 1;
|
||||||
public static float siegeCannonVelocityPerFuel = 1.0125f;
|
public static float siegeCannonVelocityPerFuel = 1.0125f;
|
||||||
public static int siegeCannonMaxFuel = 5;
|
public static int siegeCannonMaxFuel = 5;
|
||||||
public static Material siegeCannonFuelItem = Material.STRING;
|
public static Material siegeCannonFuelItem = Material.GUNPOWDER;
|
||||||
|
public static HashMap<ItemStack, SiegeEngineProjectile> siegeCannonProjectiles = new HashMap<>();
|
||||||
|
|
||||||
public static int navalCannonShotAmount = 1;
|
public static int navalCannonShotAmount = 1;
|
||||||
public static float navalCannonVelocityPerFuel = 1.0125f;
|
public static float navalCannonVelocityPerFuel = 1.075f;
|
||||||
public static int navalCannonMaxFuel = 5;
|
public static int navalCannonMaxFuel = 4;
|
||||||
public static Material navalCannonFuelItem = Material.STRING;
|
public static Material navalCannonFuelItem = Material.GUNPOWDER;
|
||||||
|
|
||||||
public static HashMap<ItemStack, SiegeEngineProjectile> trebuchetProjectiles = new HashMap<>();
|
|
||||||
public static HashMap<ItemStack, SiegeEngineProjectile> siegeCannonProjectiles = new HashMap<>();
|
|
||||||
public static HashMap<ItemStack, SiegeEngineProjectile> navalCannonProjectiles = new HashMap<>();
|
public static HashMap<ItemStack, SiegeEngineProjectile> navalCannonProjectiles = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
// Projectiles
|
// Projectiles
|
||||||
|
|
||||||
public static LinkedHashMap<String, SiegeEngineProjectile> projectileMap = new LinkedHashMap<>();
|
public static LinkedHashMap<String, SiegeEngineProjectile> projectileMap = new LinkedHashMap<>();
|
||||||
@@ -96,6 +102,22 @@ public class Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ballistaShotAmount = config.getInt("SiegeEngines.Ballista.ShotAmount");
|
||||||
|
ballistaVelocityPerFuel = (float) config.getDouble("SiegeEngines.Ballista.VelocityPerFuel");
|
||||||
|
ballistaMaxFuel = config.getInt("SiegeEngines.Ballista.MaxFuel");
|
||||||
|
try {
|
||||||
|
ballistaFuelItem = Material.getMaterial(config.getString("SiegeEngines.Ballista.FuelItem"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
ballistaFuelItem = Material.STRING;
|
||||||
|
SiegeEnginesLogger.warn("Propellant item material could not be found, defaulting to "
|
||||||
|
+ ballistaFuelItem.toString() + " !");
|
||||||
|
}
|
||||||
|
for (String projectileName : config.getStringList("SiegeEngines.Ballista.Projectiles")) {
|
||||||
|
if (projectileMap.keySet().contains(projectileName)) {
|
||||||
|
ballistaProjectiles.put(projectileMap.get(projectileName).getAmmuinitionItem(), projectileMap.get(projectileName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
siegeCannonShotAmount = config.getInt("SiegeEngines.SiegeCannon.ShotAmount");
|
siegeCannonShotAmount = config.getInt("SiegeEngines.SiegeCannon.ShotAmount");
|
||||||
siegeCannonVelocityPerFuel = (float) config.getDouble("SiegeEngines.SiegeCannon.VelocityPerFuel");
|
siegeCannonVelocityPerFuel = (float) config.getDouble("SiegeEngines.SiegeCannon.VelocityPerFuel");
|
||||||
siegeCannonMaxFuel = config.getInt("SiegeEngines.SiegeCannon.MaxFuel");
|
siegeCannonMaxFuel = config.getInt("SiegeEngines.SiegeCannon.MaxFuel");
|
||||||
|
|||||||
@@ -34,20 +34,20 @@ AutoReload: false
|
|||||||
Projectiles:
|
Projectiles:
|
||||||
StoneShot:
|
StoneShot:
|
||||||
ProjectileType: EXPLOSIVE
|
ProjectileType: EXPLOSIVE
|
||||||
ExplodePower: 1.0
|
ExplodePower: 1.5
|
||||||
Inaccuracy: 0.3
|
Inaccuracy: 0.125
|
||||||
ProjectileCount: 1
|
ProjectileCount: 1
|
||||||
AmmoItem: COBBLESTONE
|
AmmoItem: COBBLESTONE
|
||||||
BreachShot:
|
BreachShot:
|
||||||
ProjectileType: EXPLOSIVE
|
ProjectileType: EXPLOSIVE
|
||||||
ExplodePower: 3.0
|
ExplodePower: 3.75
|
||||||
Inaccuracy: 0.3
|
Inaccuracy: 0.3
|
||||||
ProjectileCount: 1
|
ProjectileCount: 1
|
||||||
AmmoItem: IRON_BLOCK
|
AmmoItem: IRON_BLOCK
|
||||||
RepeatingShot:
|
RepeatingShot:
|
||||||
ProjectileType: EXPLOSIVE
|
ProjectileType: EXPLOSIVE
|
||||||
ExplodePower: 1.0
|
ExplodePower: 1.0
|
||||||
Inaccuracy: 0.45
|
Inaccuracy: 0.325
|
||||||
ProjectileCount: 5
|
ProjectileCount: 5
|
||||||
AmmoItem: TNT
|
AmmoItem: TNT
|
||||||
ScatterShot:
|
ScatterShot:
|
||||||
@@ -56,10 +56,22 @@ Projectiles:
|
|||||||
EntityCount: 24
|
EntityCount: 24
|
||||||
EntityShotType: ARROW
|
EntityShotType: ARROW
|
||||||
AmmoItem: GRAVEL
|
AmmoItem: GRAVEL
|
||||||
|
BallistaBoltShot:
|
||||||
|
ProjectileType: ENTITY
|
||||||
|
Inaccuracy: 0.025
|
||||||
|
EntityCount: 1
|
||||||
|
EntityShotType: ARROW
|
||||||
|
AmmoItem: ARROW
|
||||||
|
DragonsBreath:
|
||||||
|
ProjectileType: ENTITY
|
||||||
|
Inaccuracy: 0.25
|
||||||
|
EntityCount: 3
|
||||||
|
EntityShotType: DRAGON_FIREBALL
|
||||||
|
AmmoItem: DRAGON_BREATH
|
||||||
FireShot:
|
FireShot:
|
||||||
ProjectileType: ENTITY
|
ProjectileType: ENTITY
|
||||||
Inaccuracy: 0.75
|
Inaccuracy: 0.475
|
||||||
EntityCount: 4
|
EntityCount: 8
|
||||||
EntityShotType: SMALL_FIREBALL
|
EntityShotType: SMALL_FIREBALL
|
||||||
AmmoItem: MAGMA_BLOCK
|
AmmoItem: MAGMA_BLOCK
|
||||||
FireworkShot:
|
FireworkShot:
|
||||||
@@ -67,18 +79,29 @@ Projectiles:
|
|||||||
Inaccuracy: 0.125
|
Inaccuracy: 0.125
|
||||||
EntityCount: 1
|
EntityCount: 1
|
||||||
VelocityFactor: 0.5
|
VelocityFactor: 0.5
|
||||||
Delay: 6
|
Delay: 5
|
||||||
|
|
||||||
SiegeEngines:
|
SiegeEngines:
|
||||||
Trebuchet:
|
Trebuchet:
|
||||||
ShotAmount: 1
|
ShotAmount: 1
|
||||||
VelocityPerFuel: 0.3
|
VelocityPerFuel: 0.3
|
||||||
MaxFuel: 5
|
MaxFuel: 3
|
||||||
FuelItem: STRING
|
FuelItem: STRING
|
||||||
Projectiles:
|
Projectiles:
|
||||||
- StoneShot
|
- StoneShot
|
||||||
- BreachShot
|
- BreachShot
|
||||||
- FireShot
|
- FireShot
|
||||||
|
- RepeatingShot
|
||||||
|
Ballista:
|
||||||
|
ShotAmount: 1
|
||||||
|
VelocityPerFuel: 0.925
|
||||||
|
MaxFuel: 2
|
||||||
|
FuelItem: STRING
|
||||||
|
Projectiles:
|
||||||
|
- BallistaBoltShot
|
||||||
|
- ScatterShot
|
||||||
|
- DragonsBreath
|
||||||
|
- FireworkShot
|
||||||
SiegeCannon:
|
SiegeCannon:
|
||||||
ShotAmount: 1
|
ShotAmount: 1
|
||||||
VelocityPerFuel: 1.0125
|
VelocityPerFuel: 1.0125
|
||||||
@@ -91,8 +114,8 @@ SiegeEngines:
|
|||||||
- FireworkShot
|
- FireworkShot
|
||||||
NavalCannon:
|
NavalCannon:
|
||||||
ShotAmount: 1
|
ShotAmount: 1
|
||||||
VelocityPerFuel: 1.0125
|
VelocityPerFuel: 0.975
|
||||||
MaxFuel: 5
|
MaxFuel: 4
|
||||||
FuelItem: GUNPOWDER
|
FuelItem: GUNPOWDER
|
||||||
Projectiles:
|
Projectiles:
|
||||||
- StoneShot
|
- StoneShot
|
||||||
|
|||||||
Reference in new issue
Block a user