|
6 | 6 | import dev.ryanhcode.sable.Sable; |
7 | 7 | import dev.ryanhcode.sable.companion.math.BoundingBox3i; |
8 | 8 | import dev.ryanhcode.sable.companion.math.BoundingBox3ic; |
9 | | -import dev.ryanhcode.sable.companion.math.JOMLConversion; |
10 | 9 | import dev.ryanhcode.sable.companion.math.Pose3dc; |
11 | 10 | import dev.ryanhcode.sable.mixin.sublevel_render.RenderSectionAccessor; |
12 | 11 | import dev.ryanhcode.sable.mixinterface.sublevel_render.vanilla.RenderSectionExtension; |
@@ -204,29 +203,12 @@ public void compileSections(final PrioritizeChunkUpdates chunkUpdates, final Ren |
204 | 203 | } |
205 | 204 |
|
206 | 205 | final ProfilerFiller profiler = Minecraft.getInstance().getProfiler(); |
207 | | - final Vector3d cameraPos = JOMLConversion.atCenterOf(camera.getBlockPosition()).sub(8, 8, 8); |
208 | | - this.subLevel.logicalPose().transformPositionInverse(cameraPos); |
209 | | - |
210 | 206 | for (final SectionRenderDispatcher.RenderSection renderSection : this.dirtyRenderSections) { |
211 | 207 | ((RenderSectionExtension) renderSection).sable$setListening(false); |
212 | 208 |
|
213 | | - boolean buildSync = false; |
214 | | - if (chunkUpdates == PrioritizeChunkUpdates.NEARBY) { |
215 | | - final BlockPos origin = renderSection.getOrigin(); |
216 | | - buildSync = cameraPos.distanceSquared(origin.getX(), origin.getY(), origin.getZ()) < 768.0 || renderSection.isDirtyFromPlayer(); |
217 | | - } else if (chunkUpdates == PrioritizeChunkUpdates.PLAYER_AFFECTED) { |
218 | | - buildSync = renderSection.isDirtyFromPlayer(); |
219 | | - } |
220 | | - |
221 | | - if (buildSync) { |
222 | | - profiler.push("sublevel_build_near_sync"); |
223 | | - this.sectionRenderDispatcher.rebuildSectionSync(renderSection, renderRegionCache); |
224 | | - profiler.pop(); |
225 | | - } else { |
226 | | - profiler.push("sublevel_schedule_async_compile"); |
227 | | - renderSection.rebuildSectionAsync(this.sectionRenderDispatcher, renderRegionCache); |
228 | | - profiler.pop(); |
229 | | - } |
| 209 | + profiler.push("sublevel_schedule_async_compile"); |
| 210 | + renderSection.rebuildSectionAsync(this.sectionRenderDispatcher, renderRegionCache); |
| 211 | + profiler.pop(); |
230 | 212 |
|
231 | 213 | renderSection.setNotDirty(); |
232 | 214 | ((RenderSectionExtension) renderSection).sable$setListening(true); |
|
0 commit comments