LegacyGameLobbyManager bug fixes
This commit is contained in:
parent
620e219b14
commit
7ff6e33941
@ -23,6 +23,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Sheep;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -38,7 +39,7 @@ public class LegacyGameLobbyManager extends LobbyManager
|
||||
|
||||
public LegacyGameLobbyManager(ArcadeManager manager)
|
||||
{
|
||||
super(manager, null, null, null);
|
||||
super(manager, null, null, new Location(UtilWorld.getWorld("world"), 0, 102.5, -15));
|
||||
|
||||
setSpawn(new Location(WORLD, 0, 104, 0, 0, 0));
|
||||
|
||||
@ -47,6 +48,8 @@ public class LegacyGameLobbyManager extends LobbyManager
|
||||
setTeamText(new Location(WORLD, 40, 120, 0));
|
||||
setAdvText(new Location(WORLD, 0, 140, -60));
|
||||
|
||||
setPodium(new Location(UtilWorld.getWorld("world"), 0, 101.5, -15), Material.EMERALD_BLOCK.getId(), (byte) 0);
|
||||
|
||||
_kitDisplay = new Location(WORLD, -17, 101, 0);
|
||||
|
||||
float yaw = UtilAlg.GetYaw(UtilAlg.getTrajectory(_kitDisplay, getSpawn()));
|
||||
@ -64,7 +67,7 @@ public class LegacyGameLobbyManager extends LobbyManager
|
||||
{
|
||||
for (int i = 0; i < teams.size(); i++)
|
||||
{
|
||||
Location entLoc = _kitDisplay.clone().subtract(0, 0, i * space - offset);
|
||||
Location entLoc = _teamDisplay.clone().subtract(0, 0, i * space - offset);
|
||||
|
||||
setKitTeamBlocks(entLoc.clone(), 35, teams.get(i).GetColorData(), getTeamBlocks());
|
||||
|
||||
@ -418,4 +421,66 @@ public class LegacyGameLobbyManager extends LobbyManager
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setPodium(Location loc, int id, byte data)
|
||||
{
|
||||
HashSet<Block> blockSet = new HashSet<>();
|
||||
//Coloring
|
||||
Block block = loc.clone().add( 0.5, 0, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
block = loc.clone().add(-0.5, 0, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
block = loc.clone().add( 0.5, 0, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
block = loc.clone().add(-0.5, 0, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
|
||||
//Top
|
||||
block = loc.clone().add( 0.5, 1, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
block = loc.clone().add(-0.5, 1, 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
block = loc.clone().add( 0.5, 1, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
block = loc.clone().add(-0.5, 1, -0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 44, (byte)5);
|
||||
|
||||
//Floor
|
||||
for (int x=-2 ; x<2 ; x++)
|
||||
{
|
||||
for (int z=-2 ; z<2 ; z++)
|
||||
{
|
||||
block = loc.clone().add(x + 0.5, -1, z + 0.5).getBlock();
|
||||
blockSet.add(block);
|
||||
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), id, data);
|
||||
}
|
||||
}
|
||||
|
||||
//Outline
|
||||
for (int x=-3 ; x<3 ; x++)
|
||||
{
|
||||
for (int z=-3 ; z<3 ; z++)
|
||||
{
|
||||
block = loc.clone().add(x + 0.5, -1, z + 0.5).getBlock();
|
||||
if (blockSet.contains(block)) continue;
|
||||
|
||||
MapUtil.QuickChangeBlockAt(block.getLocation(), 35, (byte)15);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user