Fix Wither disguise
This commit is contained in:
parent
0f752fb7e3
commit
557b0bf978
|
@ -5,6 +5,8 @@ import net.minecraft.server.v1_8_R3.EntityWither;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
|
|
||||||
public class DisguiseWither extends DisguiseMonster
|
public class DisguiseWither extends DisguiseMonster
|
||||||
{
|
{
|
||||||
public DisguiseWither(org.bukkit.entity.Entity entity)
|
public DisguiseWither(org.bukkit.entity.Entity entity)
|
||||||
|
@ -24,6 +26,7 @@ public class DisguiseWither extends DisguiseMonster
|
||||||
|
|
||||||
public void setInvulTime(int i)
|
public void setInvulTime(int i)
|
||||||
{
|
{
|
||||||
|
DataWatcher.watch(17, Integer.valueOf(i), EntityWither.META_INVUL_TIME, i);
|
||||||
DataWatcher.watch(20, Integer.valueOf(i), EntityWither.META_INVUL_TIME, i);
|
DataWatcher.watch(20, Integer.valueOf(i), EntityWither.META_INVUL_TIME, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilAction;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
|
@ -43,7 +44,7 @@ public class ElytraRings extends SoloGame
|
||||||
{
|
{
|
||||||
super(manager, GameType.ElytraRings, new Kit[]
|
super(manager, GameType.ElytraRings, new Kit[]
|
||||||
{
|
{
|
||||||
new KitUHC(manager)
|
new KitElytraRings(manager)
|
||||||
}, new String[]
|
}, new String[]
|
||||||
{
|
{
|
||||||
"Fly through the rings!"
|
"Fly through the rings!"
|
||||||
|
@ -175,7 +176,7 @@ public class ElytraRings extends SoloGame
|
||||||
|
|
||||||
if (exp > 0.05 && _lastLocation.containsKey(player.getUniqueId()))
|
if (exp > 0.05 && _lastLocation.containsKey(player.getUniqueId()))
|
||||||
{
|
{
|
||||||
UtilAction.velocity(player, player.getLocation().getDirection());
|
UtilAction.velocity(player, player.getLocation().getDirection().multiply(0.3));
|
||||||
|
|
||||||
if (!_goneThrough.containsKey(player.getUniqueId())
|
if (!_goneThrough.containsKey(player.getUniqueId())
|
||||||
|| _rings.containsKey(_goneThrough.get(player.getUniqueId()) + 1))
|
|| _rings.containsKey(_goneThrough.get(player.getUniqueId()) + 1))
|
||||||
|
@ -206,7 +207,7 @@ public class ElytraRings extends SoloGame
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
if (event.isSneaking())
|
if (event.isSneaking() && UtilPlayer.isGliding(player))
|
||||||
{
|
{
|
||||||
_lastLocation.put(player.getUniqueId(), player.getLocation());
|
_lastLocation.put(player.getUniqueId(), player.getLocation());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue