mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-03 06:28:55 +00:00
projectiles fix
This commit is contained in:
1 parent
9f561fff16
commit
9fd8bc48a3
2 files changed
+9
-9
No files matched your search
@@ -88,7 +88,7 @@ public class SiegeEngine implements Cloneable {
|
|||||||
|
|
||||||
// Set Default values
|
// Set Default values
|
||||||
xOffset = 0;
|
xOffset = 0;
|
||||||
yOffset = 0;
|
yOffset = 2;
|
||||||
maxFuel = 5;
|
maxFuel = 5;
|
||||||
velocityPerFuel = 1.0125f;
|
velocityPerFuel = 1.0125f;
|
||||||
id = name.replaceAll(" ", "_").toLowerCase();
|
id = name.replaceAll(" ", "_").toLowerCase();
|
||||||
@@ -121,18 +121,19 @@ public class SiegeEngine implements Cloneable {
|
|||||||
defaultProj.EntityTyp = EntityType.SHULKER_BULLET;
|
defaultProj.EntityTyp = EntityType.SHULKER_BULLET;
|
||||||
defaultProj.ParticleType = Particle.WHITE_ASH;
|
defaultProj.ParticleType = Particle.WHITE_ASH;
|
||||||
defaultProj.SoundType = Sound.ENTITY_BLAZE_SHOOT;
|
defaultProj.SoundType = Sound.ENTITY_BLAZE_SHOOT;
|
||||||
if (projectiles.keySet().isEmpty() || projectiles.isEmpty())
|
|
||||||
projectiles.put(new ItemStack(Material.GUNPOWDER), defaultProj);
|
|
||||||
for (ItemStack mat : projectiles.keySet()) {
|
|
||||||
projectiles.put(mat, projectiles.get(mat));
|
|
||||||
}
|
|
||||||
|
|
||||||
// set passed parameters as object variables
|
// set passed parameters as object variables
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.projectiles = projectiles;
|
|
||||||
this.fuelItem = fuelItem;
|
this.fuelItem = fuelItem;
|
||||||
this.customModelID = customModelID;
|
this.customModelID = customModelID;
|
||||||
|
|
||||||
|
// set projectiles
|
||||||
|
if (projectiles.keySet().isEmpty() || projectiles.isEmpty()) {
|
||||||
|
this.projectiles.put(new ItemStack(Material.GUNPOWDER), defaultProj);
|
||||||
|
} else {
|
||||||
|
this.projectiles = projectiles;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(String EquipmentId) {
|
public boolean equals(String EquipmentId) {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import org.bukkit.entity.EntityType;
|
|||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.metadata.MetadataValueAdapter;
|
import org.bukkit.metadata.MetadataValueAdapter;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user