Fix set block packet division
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2023-09-13 21:27:37 +02:00
Ursprung 4955631c49
Commit 1045f35f26

Datei anzeigen

@ -48,11 +48,11 @@ public class SetBlockPacketListener implements AxiomPacketListener {
int z = getZ.invoke(pos);
// Update blocks
if(RegionProtection.getProtection.apply(player, world).canBuildInSection(x >> 4, y >> 4, z >> 4)) {
if(RegionProtection.getProtection.apply(player, world).canBuildInSection(x / 16, y / 16, z / 16)) {
if (updateNeighbors) {
setBlock.invoke(AxiomPaper.convert(player.getWorld()), pos, state, 3);
} else {
ChunkSectionModifier section = new ChunkSectionModifier(player.getWorld(), x >> 4, y >> 4, z >> 4);
ChunkSectionModifier section = new ChunkSectionModifier(player.getWorld(), x / 16, y / 16, z / 16);
section.setState(x & 0xF, y & 0xF, z & 0xF, state);
section.finish();
}