12
1

Potential posToChunk fix
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-08-27 15:20:16 +02:00
Ursprung c7eba24ae6
Commit a24585e497

Datei anzeigen

@ -19,6 +19,7 @@
package de.steamwar.fightsystem.utils;
import de.steamwar.techhider.ProtocolUtils;
import org.bukkit.Location;
import org.bukkit.block.Block;
@ -79,24 +80,20 @@ public class Region {
return maxZ - minZ;
}
public double posToChunk(int pos){
return pos / 16.0;
}
private int getMinChunkX(){
return (int) Math.floor(posToChunk(minX));
return ProtocolUtils.posToChunk(minX);
}
private int getMaxChunkX(){
return (int) Math.ceil(posToChunk(maxX));
return ProtocolUtils.posToChunk(maxX);
}
private int getMinChunkZ(){
return (int) Math.floor(posToChunk(minZ));
return ProtocolUtils.posToChunk(minZ);
}
private int getMaxChunkZ(){
return (int) Math.ceil(posToChunk(maxZ));
return ProtocolUtils.posToChunk(maxZ);
}
public boolean chunkOutside(int cX, int cZ) {