UHC changes
This commit is contained in:
parent
f972418fd1
commit
36a98d5e41
@ -166,7 +166,7 @@ public class UHC extends TeamGame
|
|||||||
//Set Portal Blocks
|
//Set Portal Blocks
|
||||||
for (int i=0 ; i<_portalBlock.size() ; i++)
|
for (int i=0 ; i<_portalBlock.size() ; i++)
|
||||||
{
|
{
|
||||||
if (i<6)
|
if (i<9)
|
||||||
_portalBlock.get(i).getBlock().setTypeIdAndData(Material.ENDER_PORTAL_FRAME.getId(), (byte)4, true);
|
_portalBlock.get(i).getBlock().setTypeIdAndData(Material.ENDER_PORTAL_FRAME.getId(), (byte)4, true);
|
||||||
else
|
else
|
||||||
_portalBlock.get(i).getBlock().setTypeIdAndData(Material.ENDER_PORTAL_FRAME.getId(), (byte)0, true);
|
_portalBlock.get(i).getBlock().setTypeIdAndData(Material.ENDER_PORTAL_FRAME.getId(), (byte)0, true);
|
||||||
@ -290,7 +290,7 @@ public class UHC extends TeamGame
|
|||||||
if (from.getX() >= WorldData.MaxX) from.setX(WorldData.MaxX - 1);
|
if (from.getX() >= WorldData.MaxX) from.setX(WorldData.MaxX - 1);
|
||||||
if (from.getX() < WorldData.MinX) from.setX(WorldData.MinX + 1);
|
if (from.getX() < WorldData.MinX) from.setX(WorldData.MinX + 1);
|
||||||
if (from.getZ() >= WorldData.MaxZ) from.setZ(WorldData.MaxZ - 1);
|
if (from.getZ() >= WorldData.MaxZ) from.setZ(WorldData.MaxZ - 1);
|
||||||
if (from.getZ() < WorldData.MaxZ) from.setZ(WorldData.MinZ + 1);
|
if (from.getZ() < WorldData.MinZ) from.setZ(WorldData.MinZ + 1);
|
||||||
|
|
||||||
event.setTo(event.getFrom());
|
event.setTo(event.getFrom());
|
||||||
|
|
||||||
@ -303,46 +303,24 @@ public class UHC extends TeamGame
|
|||||||
if (event.GetState() != GameState.Recruit)
|
if (event.GetState() != GameState.Recruit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
long time = System.currentTimeMillis();
|
||||||
|
|
||||||
this.WorldData.MinX = -_borders;
|
this.WorldData.MinX = -_borders;
|
||||||
this.WorldData.MaxX = _borders;
|
this.WorldData.MaxX = _borders;
|
||||||
this.WorldData.MinZ = -_borders;
|
this.WorldData.MinZ = -_borders;
|
||||||
this.WorldData.MaxZ = _borders;
|
this.WorldData.MaxZ = _borders;
|
||||||
|
|
||||||
int min = -(_borders/16 + 1);
|
for (int y=0 ; y<128 ; y++)
|
||||||
int max = _borders/16;
|
for (int x=-_borders ; x<_borders ; x++)
|
||||||
|
for (int z=-_borders ; z<_borders ; z++)
|
||||||
for (int x=min ; x<=max ; x++)
|
|
||||||
{
|
{
|
||||||
WorldBoundaryRed(WorldData.World.getChunkAt(x, max));
|
if (x == -_borders || x == _borders-1 || z == -_borders || z == _borders-1)
|
||||||
WorldBoundaryRed(WorldData.World.getChunkAt(x, min));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int z=min ; z<=max ; z++)
|
|
||||||
{
|
{
|
||||||
WorldBoundaryRed(WorldData.World.getChunkAt(max, z));
|
MapUtil.QuickChangeBlockAt(WorldData.World, x, y, z , 159, (byte)14);
|
||||||
WorldBoundaryRed(WorldData.World.getChunkAt(min, z));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void WorldBoundaryRed(Chunk chunk)
|
System.out.println("Time: " + UtilTime.MakeStr(System.currentTimeMillis() - time));
|
||||||
{
|
|
||||||
Block block;
|
|
||||||
for (int x=0 ; x<16 ; x++)
|
|
||||||
for (int z=0 ; z<16 ; z++)
|
|
||||||
for (int y=0 ; y<256 ; y++)
|
|
||||||
{
|
|
||||||
block = chunk.getBlock(x, y, z);
|
|
||||||
|
|
||||||
if (
|
|
||||||
block.getX() < WorldData.MaxX &&
|
|
||||||
block.getX() >= WorldData.MinX &&
|
|
||||||
block.getZ() < WorldData.MaxZ &&
|
|
||||||
block.getZ() >= WorldData.MinZ)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (block.getTypeId() != 0 || block.getY() <= 128)
|
|
||||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 159, (byte)14);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -765,6 +743,7 @@ public class UHC extends TeamGame
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
//Owner Bypass
|
//Owner Bypass
|
||||||
if (Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.OWNER))
|
if (Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.OWNER))
|
||||||
return;
|
return;
|
||||||
@ -772,6 +751,7 @@ public class UHC extends TeamGame
|
|||||||
//Disallow
|
//Disallow
|
||||||
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, ChatColor.YELLOW + "You cannot join this UHC.");
|
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, ChatColor.YELLOW + "You cannot join this UHC.");
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CraftRecipes()
|
private void CraftRecipes()
|
||||||
@ -1241,6 +1221,9 @@ public class UHC extends TeamGame
|
|||||||
if (_lastDragonDamager == null)
|
if (_lastDragonDamager == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!(event.getEntity() instanceof EnderDragon))
|
||||||
|
return;
|
||||||
|
|
||||||
AnnounceEnd(_lastDragonDamager);
|
AnnounceEnd(_lastDragonDamager);
|
||||||
_ended = true;
|
_ended = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user