SteamWar/FightSystem
Archiviert
13
1

Merge branch 'blockupdatelessReplace' of SteamWar/FightSystem into master

Dieser Commit ist enthalten in:
Lixfel 2020-04-28 09:31:22 +02:00 committet von Gitea
Commit 851dbd6a73
2 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -67,6 +67,7 @@ public class Config {
public static final boolean TeamBlueRotate;
public static final boolean ReplaceObsidian;
public static final boolean ReplaceBedrock;
public static final boolean ReplaceWithBlockupdates;
//team parameter
public static final String TeamRedName;
@ -156,6 +157,7 @@ public class Config {
boolean rotate = config.getBoolean("Schematic.Rotate");
ReplaceObsidian = config.getBoolean("Schematic.ReplaceObsidian");
ReplaceBedrock = config.getBoolean("Schematic.ReplaceBedrock");
ReplaceWithBlockupdates = config.getBoolean("Schematic.ReplaceWithBlockupdates");
TeamRedPrefix = config.getString("Output.TeamRedPrefix");
TeamBluePrefix = config.getString("Output.TeamBluePrefix");

Datei anzeigen

@ -384,16 +384,22 @@ public class FightTeam implements IFightTeam{
Location minPoint = new Location(world, cornerX, cornerY, cornerZ);
Location maxPoint = new Location(world, (cornerX + Config.SchemsizeX), (cornerY + Config.SchemsizeY), (cornerZ + Config.SchemsizeZ));
FreezeWorld freezer = null;
if(!Config.ReplaceWithBlockupdates)
freezer = new FreezeWorld();
for(int x = minPoint.getBlockX(); x <= maxPoint.getBlockX(); x++) {
for(int z = minPoint.getBlockZ(); z <= maxPoint.getBlockZ(); z++) {
for(int y = minPoint.getBlockY(); y <= maxPoint.getBlockY(); y++) {
Block block = world.getBlockAt(x, y, z);
if(block.getType() == target)
block.setType(replacement);
}
}
}
if(!Config.ReplaceWithBlockupdates)
HandlerList.unregisterAll(freezer);
}
private void setTeamColor(Team team, ChatColor color){