fix fluid sim bounds loop
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-11-30 20:50:01 -05:00
parent 239af5e7ab
commit cc08cc85d9
2 changed files with 7 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import electrosphere.entity.EntityDataStrings;
import electrosphere.entity.types.fluid.FluidChunk;
import electrosphere.renderer.shader.VisualShader;
import electrosphere.server.fluid.manager.ServerFluidChunk;
import electrosphere.server.terrain.manager.ServerTerrainChunk;
/**
*
@ -73,9 +74,9 @@ public class FluidCell {
protected Vector3d getRealPos(){
return new Vector3d(
worldPos.x * FluidChunkData.CHUNK_SIZE,
worldPos.y * FluidChunkData.CHUNK_SIZE,
worldPos.z * FluidChunkData.CHUNK_SIZE
worldPos.x * ServerTerrainChunk.CHUNK_PLACEMENT_OFFSET,
worldPos.y * ServerTerrainChunk.CHUNK_PLACEMENT_OFFSET,
worldPos.z * ServerTerrainChunk.CHUNK_PLACEMENT_OFFSET
);
}

View File

@ -334,9 +334,9 @@ public class FluidCellManager {
worldPos.z < Globals.clientWorldData.getWorldDiscreteSize()
){
String key = getCellKey(
Globals.clientWorldData.convertRealToChunkSpace(chunkRealSpace.x),
Globals.clientWorldData.convertRealToChunkSpace(chunkRealSpace.y),
Globals.clientWorldData.convertRealToChunkSpace(chunkRealSpace.z)
worldPos.x,
worldPos.y,
worldPos.z
);
if(!keyCellMap.containsKey(key) && !hasNotRequested.contains(key) && !undrawable.contains(key) && !drawable.contains(key) &&
!hasRequested.contains(key)){