SteamWar/FightSystem
Archiviert
13
1

Bugfixes, remove debug info
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-12-17 18:23:54 +01:00
Ursprung 5fab7e5404
Commit ce3384c7e9

Datei anzeigen

@ -22,7 +22,6 @@ package de.steamwar.fightsystem.utils;
import de.steamwar.fightsystem.Config;
import de.steamwar.fightsystem.FightSystem;
import de.steamwar.fightsystem.fight.FightTeam;
import de.steamwar.techhider.BlockIds;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
@ -144,10 +143,9 @@ public class Hull {
}
});
FightSystem.getPlugin().getLogger().log(Level.INFO, () -> "[HullHider] initialisation finished: " + (System.currentTimeMillis() - start) + " ms, visible blocks: " + visibility.cardinality());
region.forEach(this::printDebug);
}
@SuppressWarnings("deprecation")
public void updateBlockVisibility(Block b, Material changedType) {
IntVector root = new IntVector(b.getX(), b.getY(), b.getZ());
if (root.notInRegion(region))
@ -168,20 +166,19 @@ public class Hull {
}
}
for (IntVector block : uncovered)
printDebug(block.x, block.y, block.z);
if(uncovered.isEmpty())
return;
//TODO uncover entities
}
private final int air = BlockIds.impl.materialToId(Material.AIR);
private final int stone = BlockIds.impl.materialToId(Material.STONE);
private final int red = BlockIds.impl.materialToId(Material.RED_CONCRETE);
private void printDebug(int x, int y, int z) {
int id = new IntVector(x, y, z).toId(region);
BlockIdWrapper.impl.setBlock(Config.world, x, y + Config.BlueExtendRegion.getSizeY(), z, visibility.get(id) ? (occluding.get(id) ? red : air) : stone);
Set<IntVector> uncoveredSet = new HashSet<>(uncovered);
Iterator<Entity> it = entities.iterator();
while(it.hasNext()) {
Entity entity = it.next();
if(uncoveredSet.contains(new IntVector(entity.getLocation()))) { //TODO more precise
it.remove();
for(Player player : players)
player.showEntity(FightSystem.getPlugin(), entity); //TODO 1.15-
}
}
}
private void forEachBorder(BiConsumer<IntVector, IntVector> f) {