snake crap
This commit is contained in:
parent
6ae801314c
commit
64b9cd201c
@ -67,8 +67,8 @@ public class SnakeCreature extends EventCreature<Silverfish>
|
|||||||
|
|
||||||
private void getNewWaypoint()
|
private void getNewWaypoint()
|
||||||
{
|
{
|
||||||
Bukkit.broadcastMessage("NEW WAYPOINT!");
|
//Bukkit.broadcastMessage("NEW WAYPOINT!");
|
||||||
_waypoint = getSpawnLocation().clone().add(Math.random() * 40 - 20, Math.random() * 24 - 8, Math.random() * 40 - 20);
|
_waypoint = getSpawnLocation().clone().add(Math.random() * 80 - 40, Math.random() * 24 - 24, Math.random() * 80 - 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -158,25 +158,33 @@ public class SnakeCreature extends EventCreature<Silverfish>
|
|||||||
{
|
{
|
||||||
SnakeSegment seg = _segments.get(i);
|
SnakeSegment seg = _segments.get(i);
|
||||||
|
|
||||||
Vector vec = seg.getLocation();
|
Vector vec = seg.getLocation().clone();
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
vec.add(UtilAlg.getTrajectory(vec, _waypoint.toVector()).multiply(0.1));
|
//Vector moveTo = UtilAlg.getTrajectory(vec, _waypoint.toVector()).multiply(0.1);
|
||||||
|
|
||||||
Bukkit.broadcastMessage("Loc: " + UtilWorld.vecToStrClean(vec));
|
Vector moveTo = new Vector(0,0.1,0);
|
||||||
|
|
||||||
|
Bukkit.broadcastMessage("Loc: " + UtilWorld.vecToStrClean(moveTo));
|
||||||
|
|
||||||
|
vec.add(moveTo);
|
||||||
|
|
||||||
|
//Bukkit.broadcastMessage("Loc: " + UtilWorld.vecToStrClean(vec));
|
||||||
|
|
||||||
if (UtilMath.offset(vec, _waypoint.toVector()) < 5)
|
if (UtilMath.offset(vec, _waypoint.toVector()) < 5)
|
||||||
{
|
{
|
||||||
getNewWaypoint();
|
getNewWaypoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_enabled = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vec = _segments.get(i-1).getLocation();
|
vec = _segments.get(i-1).getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
packets[i] = seg.moveEntity(new Vector(UtilMath.rr(10, true), 12, UtilMath.rr(10, true)));
|
packets[i] = seg.moveEntity(vec);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Player player : _canSee)
|
for (Player player : _canSee)
|
||||||
|
@ -56,6 +56,7 @@ public class BossBattles extends TeamGame
|
|||||||
|
|
||||||
HungerSet = 20;
|
HungerSet = 20;
|
||||||
CreatureAllowOverride = true;
|
CreatureAllowOverride = true;
|
||||||
|
PrepareFreeze = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
Loading…
Reference in New Issue
Block a user