Added chicken and guardian win room schematic handlers
This commit is contained in:
parent
17a4517e71
commit
d60fea4f76
@ -46,14 +46,16 @@ public class WinEffectBabyChicken extends WinEffectGadget
|
||||
{
|
||||
super(manager, "Baby Chicken", UtilText.splitLineToArray(C.cGray + "Who said you can't win by being a chicken???", LineFormat.LORE), 1,
|
||||
Material.EGG, (byte) 0);
|
||||
|
||||
// teleportMode = WinEffectTeleportMode.Grid_Team_Behind;
|
||||
|
||||
_schematicName = "ChickenPodium";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void play()
|
||||
{
|
||||
_chicken = spawnChicken(_player, _baseLocation);
|
||||
_baseLocation.add(0, -4, 0);
|
||||
|
||||
_chicken = spawnChicken(_player, getBaseLocation().add(-4, 0, 0));
|
||||
|
||||
UtilEnt.addGoalSelector(_chicken, 0, new PathfinderRandomRun(((CraftChicken)_chicken).getHandle(), getBaseLocation(), 4, 2.8));
|
||||
|
||||
@ -68,8 +70,6 @@ public class WinEffectBabyChicken extends WinEffectGadget
|
||||
UtilEnt.setBoundingBox(c, 0, 0);
|
||||
_teamChickens.add(c);
|
||||
}
|
||||
|
||||
// lockAllPlayers = true;
|
||||
}
|
||||
|
||||
public Chicken spawnChicken(Player player, Location loc)
|
||||
@ -147,6 +147,14 @@ public class WinEffectBabyChicken extends WinEffectGadget
|
||||
_teamChickens.forEach(c -> c.remove());
|
||||
team.forEach(p -> UtilPlayer.showForAll(p));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void teleport(Player player, List<Player> team, List<Player> other, Location loc)
|
||||
{
|
||||
loc = getBaseLocation().add(-10, 0, 0);
|
||||
loc.setDirection(getBaseLocation().subtract(loc).toVector());
|
||||
super.teleport(player, team, other, loc);
|
||||
}
|
||||
|
||||
private static class PathfinderRandomRun extends PathfinderGoal
|
||||
{
|
||||
|
@ -36,6 +36,8 @@ public class WinEffectRiseOfTheElderGuardian extends WinEffectGadget
|
||||
{
|
||||
super(manager, "Rise of the Elder Guardian", UtilText.splitLinesToArray(new String[]{C.cGray + C.Italics + "Say hello to my little friend...", " ", " ", C.cGray + C.Italics + "the elder guardian."}, LineFormat.LORE),
|
||||
1, Material.PRISMARINE, (byte) 2);
|
||||
|
||||
_schematicName = "ElderGuardianPodium";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -46,11 +48,11 @@ public class WinEffectRiseOfTheElderGuardian extends WinEffectGadget
|
||||
int amount = 4;
|
||||
for(int i = 0; i < amount; i++)
|
||||
{
|
||||
double rad = ((Math.PI*2)/amount) * i;
|
||||
double rad = ((Math.PI*2)/amount) * i + Math.PI/4.0;
|
||||
double x = Math.sin(rad);
|
||||
double z = Math.cos(rad);
|
||||
|
||||
Vector diff = new Vector(x, 0, z).multiply(4.5).setY(-2.5);
|
||||
Vector diff = new Vector(x, 0, z).multiply(5.7).setY(1);
|
||||
|
||||
Location loc = getBaseLocation().add(diff);
|
||||
|
||||
@ -104,7 +106,6 @@ public class WinEffectRiseOfTheElderGuardian extends WinEffectGadget
|
||||
{
|
||||
UtilParticle.PlayParticleToAll(ParticleType.EXPLODE, getBaseLocation().add(0, 1, 0), 0.3f, 0.6f, 0.3f, 0.07f, 400, ViewDist.NORMAL);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.EXPLODE, getBaseLocation().add(0, 0.3, 0), 0.7f, 0.1f, 0.7f, 0.07f, 400, ViewDist.NORMAL);
|
||||
// getBaseLocation().getWorld().playSound(getBaseLocation(), Sound.EXPLODE, 1, 1);
|
||||
getBaseLocation().getWorld().playSound(getBaseLocation(), Sound.ZOMBIE_REMEDY, 6f, 0.75f);
|
||||
|
||||
getBaseLocation().getWorld().playSound(getBaseLocation(), Sound.EXPLODE, 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user