Update craftbukkit, add new vegetate head, fix maze, fix SG and UHC borders, fix gust, modify kits to use new vegetate
This commit is contained in:
parent
7fca42b0e0
commit
388aa1611c
Binary file not shown.
@ -122,6 +122,11 @@ public class UtilEnt
|
||||
}
|
||||
|
||||
public static void Vegetate(Entity entity, boolean mute)
|
||||
{
|
||||
Vegetate(entity, mute, false);
|
||||
}
|
||||
|
||||
public static void Vegetate(Entity entity, boolean mute, boolean vegetateHead)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -169,6 +174,8 @@ public class UtilEnt
|
||||
creature.setVegetated(true);
|
||||
creature.setSilent(mute);
|
||||
|
||||
creature.getControllerLook().vegetateHead(vegetateHead);
|
||||
|
||||
((List)_pathfinderBList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
|
||||
((List)_pathfinderCList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
|
||||
|
||||
|
@ -428,16 +428,9 @@ public class Maze implements Listener
|
||||
{
|
||||
data.getValue().Direction = CardinalDirection.WEST;
|
||||
}
|
||||
UtilEnt.CreatureMove(data.getKey(), data.getValue().Target, 1.4f);
|
||||
|
||||
}
|
||||
|
||||
//Timeout Move
|
||||
if (UtilMath.offset(data.getKey().getLocation(), data.getValue().Last) > 0.1)
|
||||
data.getValue().Time = System.currentTimeMillis();
|
||||
|
||||
if (UtilTime.elapsed(data.getValue().Time, 2000))
|
||||
UtilEnt.CreatureMove(data.getKey(), data.getValue().Target, 1.4f);
|
||||
UtilEnt.CreatureMoveFast(data.getKey(), data.getValue().Target, 1.4f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,14 +6,12 @@ public class MazeMobWaypoint
|
||||
{
|
||||
public Location Last;
|
||||
public Location Target;
|
||||
public long Time;
|
||||
public CardinalDirection Direction = CardinalDirection.NULL;
|
||||
|
||||
public MazeMobWaypoint(Location last)
|
||||
{
|
||||
Last = last;
|
||||
Target = null;
|
||||
Time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public enum CardinalDirection
|
||||
|
@ -877,21 +877,28 @@ public abstract class SurvivalGames extends Game
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onGameState(PlayerChangedWorldEvent event)
|
||||
public void onGameState(GameStateChangeEvent event)
|
||||
{
|
||||
if (GetState() == GameState.Prepare || IsLive())
|
||||
if (GetState() != GameState.Live)
|
||||
{
|
||||
setupBorder(event.getPlayer());
|
||||
return;
|
||||
}
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
setupBorder(player);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event)
|
||||
{
|
||||
if (GetState() == GameState.Prepare || IsLive())
|
||||
if (!IsLive())
|
||||
{
|
||||
setupBorder(event.getPlayer());
|
||||
return;
|
||||
}
|
||||
|
||||
setupBorder(event.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -1466,6 +1473,7 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
WorldBorder border = new WorldBorder();
|
||||
|
||||
border.setCenter(_spawn.getX(), _spawn.getZ());
|
||||
border.transitionSizeBetween(_previousBorder * 2, _currentBorder * 2,
|
||||
_currentBorder != _previousBorder ? 1000 : 0);
|
||||
|
||||
|
@ -12,22 +12,25 @@ import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftArrow;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.EntityArrow;
|
||||
import net.minecraft.server.v1_7_R4.Item;
|
||||
import net.minecraft.server.v1_8_R3.EntityArrow;
|
||||
import net.minecraft.server.v1_8_R3.Item;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.MapUtil;
|
||||
|
@ -32,6 +32,7 @@ import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder;
|
||||
import net.minecraft.server.v1_8_R3.WorldBorder;
|
||||
@ -349,21 +350,28 @@ public class UHC extends TeamGame
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onGameState(PlayerChangedWorldEvent event)
|
||||
public void onGameState(GameStateChangeEvent event)
|
||||
{
|
||||
if (GetState() == GameState.Prepare || IsLive())
|
||||
if (GetState() != GameState.Live)
|
||||
{
|
||||
setupBorder(event.getPlayer());
|
||||
return;
|
||||
}
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
setupBorder(player);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event)
|
||||
{
|
||||
if (GetState() == GameState.Prepare || IsLive())
|
||||
if (!IsLive())
|
||||
{
|
||||
setupBorder(event.getPlayer());
|
||||
return;
|
||||
}
|
||||
|
||||
setupBorder(event.getPlayer());
|
||||
}
|
||||
|
||||
private void setupBorder(Player player)
|
||||
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.minecraft.game.core.damage.DamageChange;
|
||||
import nautilus.game.arcade.game.games.wizards.Spell;
|
||||
@ -61,7 +62,7 @@ public class SpellGust extends Spell implements SpellClick
|
||||
|
||||
Wizards.Manager.GetDamage().GetCombatManager().Get(target).Attacked(player.getName(), 0, player, "Gust", new ArrayList<DamageChange>());
|
||||
|
||||
target.setVelocity(vec);
|
||||
UtilAction.velocity(target, vec);
|
||||
|
||||
target.getWorld().playSound(target.getLocation(), Sound.BAT_TAKEOFF, 1, 0.7F);
|
||||
}
|
||||
|
@ -147,8 +147,7 @@ public abstract class Kit implements Listener
|
||||
skel.setSkeletonType(SkeletonType.WITHER);
|
||||
}
|
||||
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.silence(entity, true);
|
||||
UtilEnt.Vegetate(entity, true, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
|
||||
SpawnCustom(entity);
|
||||
|
Loading…
Reference in New Issue
Block a user