Skip to content

Commit

Permalink
Attempt to work around a crash witgh AtomicStrykers' Minions mod: Ato…
Browse files Browse the repository at this point in the history
  • Loading branch information
Barteks2x committed Dec 2, 2022
1 parent ca61acc commit 8bf8767
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ private static void addForcedCubesHeuristic(ForgeChunkManager.ForceChunkEvent ev
if (!((ICubicWorld) world).isCubicWorld()) {
return;
}
for (int cubeY : ((ICubicTicketInternal) ticket).getAllForcedChunkCubes().get(event.getLocation())) {
IntSet forcedCubes = ((ICubicTicketInternal) ticket).getAllForcedChunkCubes().get(event.getLocation());
if (forcedCubes == null) {
CubicChunks.LOGGER.warn("CubicChunkManager: Unforcing chunk with no information about forced cubes at " + event.getLocation());
return;
}
for (int cubeY : forcedCubes) {
Cube cube = (Cube) ((ICubicWorld) world).getCubeFromCubeCoords(event.getLocation().x, cubeY, event.getLocation().z);
cube.getTickets().remove((ITicket) ticket);
}
Expand Down

0 comments on commit 8bf8767

Please sign in to comment.