Compare commits

..
Author SHA1 Message Date
Armisael5 d7be7720fe Fix empowering bee not seeing nodes correctly (#71) (#73) 2026-11-20 16:39:40 +01:00
aae90342e5 Protect some calls that lead to loadChunk with blockExists (#53) (#72)
Co-authored-by: Yurii <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: micvog <[email protected]>
2026-11-19 05:05:19 +01:00
UltraProdigy 0d13cd0993 ci: run build and test on release branches 2026-11-09 01:10:49 -05:00
2 changed files with 9 additions and 7 deletions

No files matched your search

+2 -2
View File
@@ -3,9 +3,9 @@ name: Build and test
on:
pull_request:
branches: [ master, main ]
branches: [ master, main, release/** ]
push:
branches: [ master, main ]
branches: [ master, main, release/** ]
jobs:
build-and-test:
@@ -50,14 +50,16 @@ public class BlockUtil {
public static List<Chunk> getChunksInSearchRange(World world, int xCoord, int zCoord, int searchRadius) {
List<Chunk> searchChunks = new ArrayList<Chunk>();
int chunkRange = (int) Math.ceil(searchRadius / 16.0);
int minChunkX = xCoord / 16 - chunkRange;
int maxChunkX = xCoord / 16 + chunkRange;
int minChunkZ = zCoord / 16 - chunkRange;
int maxChunkZ = zCoord / 16 + chunkRange;
int minChunkX = (xCoord - searchRadius) >> 4;
int maxChunkX = (xCoord + searchRadius) >> 4;
int minChunkZ = (zCoord - searchRadius) >> 4;
int maxChunkZ = (zCoord + searchRadius) >> 4;
for (int chunkX = minChunkX; chunkX <= maxChunkX; ++chunkX) {
for (int chunkZ = minChunkZ; chunkZ <= maxChunkZ; ++chunkZ) {
if (!world.blockExists(chunkX << 4, 0, chunkZ << 4)) {
continue;
}
Chunk chunk = world.getChunkFromChunkCoords(chunkX, chunkZ);
if (chunk != null) searchChunks.add(chunk);
}