fixed cannon becoming off-center

This commit is contained in:
Ben 2016-04-03 17:51:56 +01:00
parent ccdd1f901f
commit 40361acc9b
3 changed files with 5 additions and 7 deletions

View File

@ -120,8 +120,6 @@ public class Clans extends JavaPlugin
new IncognitoManager(this, _clientManager, packetHandler);
new PacketsInteractionFix(this, packetHandler);
StatsManager statsManager = new StatsManager(this, _clientManager);
AchievementManager achievementManager = new AchievementManager(statsManager, _clientManager, _donationManager);
Chat chat = new Chat(this, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());

View File

@ -130,7 +130,7 @@ public class Cannon extends SiegeWeapon
public Cannon(Location location, ClanInfo clan, SiegeManager siegeManager, boolean syncWithDb)
{
super(2, location, 1400, "Cannon", clan, clan.Clans, siegeManager);
super(2, location.clone().add(0.5, 0, 0.5), 1400, "Cannon", clan, clan.Clans, siegeManager);
_syncWithDb = syncWithDb;
@ -297,7 +297,7 @@ public class Cannon extends SiegeWeapon
private void loadEntities()
{
Slime filler = _location.getWorld().spawn(_location.clone().add(.5, 0, .5), Slime.class);
Slime filler = _location.getWorld().spawn(_location.clone(), Slime.class);
UtilEnt.silence(filler, true);
UtilEnt.Vegetate(filler);
@ -307,7 +307,7 @@ public class Cannon extends SiegeWeapon
addEntity(filler, "Filler_1");
Slime playerMount = _location.getWorld().spawn(_location.clone().add(.5, 0, .5), Slime.class);
Slime playerMount = _location.getWorld().spawn(_location.clone(), Slime.class);
UtilEnt.silence(playerMount, true);
UtilEnt.Vegetate(playerMount);
@ -318,7 +318,7 @@ public class Cannon extends SiegeWeapon
getEntity("Filler_1").setPassenger(playerMount);
addEntity(playerMount, "PLAYERMOUNT");
ArmorStand weapon = _location.getWorld().spawn(_location.clone().add(.5, 0, .5), ArmorStand.class);
ArmorStand weapon = _location.getWorld().spawn(_location.clone(), ArmorStand.class);
UtilEnt.setFakeHead(weapon, true);
weapon.teleport(_location);

View File

@ -856,7 +856,7 @@ public abstract class SiegeWeapon implements Listener
public Location getLocation()
{
return _location;
return _location.clone();
}
public double getSize()