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