mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-04 14:38:53 +00:00
cannons working amazingly
This commit is contained in:
1 parent
261b42e8a8
commit
e4350c7452
8 files changed
+9
-7
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -56,8 +56,10 @@ public class ClickHandler implements Listener {
|
|||||||
// world.createExplosion(loc, proj.Radius, proj.DoFire);
|
// world.createExplosion(loc, proj.Radius, proj.DoFire);
|
||||||
Entity tnt = event.getEntity().getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);
|
Entity tnt = event.getEntity().getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);
|
||||||
TNTPrimed tntEnt = (TNTPrimed) tnt;
|
TNTPrimed tntEnt = (TNTPrimed) tnt;
|
||||||
tntEnt.setFuseTicks(0);
|
|
||||||
tntEnt.setYield(proj.Radius);
|
tntEnt.setYield(proj.Radius);
|
||||||
|
tntEnt.setFuseTicks(0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
projectiles.remove(event.getEntity().getUniqueId());
|
projectiles.remove(event.getEntity().getUniqueId());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class CrunchSiegeCore extends JavaPlugin {
|
|||||||
|
|
||||||
public static void CreateTrebuchet(Player player) {
|
public static void CreateTrebuchet(Player player) {
|
||||||
Location l = player.getLocation();
|
Location l = player.getLocation();
|
||||||
//l.setY(l.getY() - 1);
|
l.setY(l.getY() - 1);
|
||||||
Entity entity2 = player.getWorld().spawnEntity(l, EntityType.ARMOR_STAND);
|
Entity entity2 = player.getWorld().spawnEntity(l, EntityType.ARMOR_STAND);
|
||||||
SiegeEquipment equip = new SiegeEquipment(entity2.getUniqueId());
|
SiegeEquipment equip = new SiegeEquipment(entity2.getUniqueId());
|
||||||
ItemStack item = new ItemStack(Material.CARVED_PUMPKIN);
|
ItemStack item = new ItemStack(Material.CARVED_PUMPKIN);
|
||||||
@@ -156,7 +156,7 @@ public class CrunchSiegeCore extends JavaPlugin {
|
|||||||
stand.addEquipmentLock(EquipmentSlot.CHEST, LockType.ADDING_OR_CHANGING);
|
stand.addEquipmentLock(EquipmentSlot.CHEST, LockType.ADDING_OR_CHANGING);
|
||||||
stand.addEquipmentLock(EquipmentSlot.FEET, LockType.ADDING_OR_CHANGING);
|
stand.addEquipmentLock(EquipmentSlot.FEET, LockType.ADDING_OR_CHANGING);
|
||||||
ent.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 2000000, 1));
|
ent.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 2000000, 1));
|
||||||
stand.setSmall(true);
|
// stand.setSmall(true);
|
||||||
stand.setVisible(true);
|
stand.setVisible(true);
|
||||||
//stand.setSmall(true);
|
//stand.setSmall(true);
|
||||||
ent.getEquipment().setHelmet(item);
|
ent.getEquipment().setHelmet(item);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class SiegeEquipment implements Cloneable {
|
|||||||
|
|
||||||
public String WorldName;
|
public String WorldName;
|
||||||
|
|
||||||
public int XOffset = 5;
|
public int XOffset = 7;
|
||||||
public int YOffset = 0;
|
public int YOffset = 0;
|
||||||
|
|
||||||
public int FuseTime;
|
public int FuseTime;
|
||||||
@@ -60,7 +60,7 @@ public class SiegeEquipment implements Cloneable {
|
|||||||
|
|
||||||
public List<Integer> FiringModelNumbers = new ArrayList<Integer>();
|
public List<Integer> FiringModelNumbers = new ArrayList<Integer>();
|
||||||
|
|
||||||
public SiegeProjectile projectile = new SiegeProjectile(3, false);
|
public SiegeProjectile projectile = new SiegeProjectile(1, false);
|
||||||
|
|
||||||
public SiegeEquipment(UUID id) {
|
public SiegeEquipment(UUID id) {
|
||||||
EntityId = id;
|
EntityId = id;
|
||||||
@@ -143,7 +143,7 @@ public class SiegeEquipment implements Cloneable {
|
|||||||
ClickHandler.projectiles.put(tnt.getUniqueId(), this.projectile);
|
ClickHandler.projectiles.put(tnt.getUniqueId(), this.projectile);
|
||||||
tnt.setVelocity(loc.getDirection().multiply(this.Velocity));
|
tnt.setVelocity(loc.getDirection().multiply(this.Velocity));
|
||||||
Bukkit.getServer().getWorld(this.WorldName).playSound(this.location, Sound.ENTITY_GENERIC_EXPLODE, 20, 2);
|
Bukkit.getServer().getWorld(this.WorldName).playSound(this.location, Sound.ENTITY_GENERIC_EXPLODE, 20, 2);
|
||||||
Bukkit.getServer().getWorld(this.WorldName).spawnParticle(Particle.EXPLOSION_NORMAL, loc.getX(), loc.getY(), loc.getZ(), 0);
|
Bukkit.getServer().getWorld(this.WorldName).spawnParticle(Particle.EXPLOSION_LARGE, loc.getX(), loc.getY(), loc.getZ(), 0);
|
||||||
}, delay);
|
}, delay);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
public class SiegeProjectile {
|
public class SiegeProjectile {
|
||||||
|
|
||||||
public int Radius = 5;
|
public int Radius = 2;
|
||||||
public Boolean DoFire = false;
|
public Boolean DoFire = false;
|
||||||
|
|
||||||
public SiegeProjectile(int rad, boolean fire) {
|
public SiegeProjectile(int rad, boolean fire) {
|
||||||
|
|||||||
Reference in new issue
Block a user