fix issue with autoboxing

This commit is contained in:
mcrcortex
2025-05-02 23:43:55 +10:00
parent 7c4a3fe7b4
commit f74992a37a
2 changed files with 3 additions and 5 deletions

View File

@@ -1325,9 +1325,7 @@ public class NodeManager {
if (this.nodeUpdates.isEmpty()) { if (this.nodeUpdates.isEmpty()) {
return false; return false;
} }
for (int i : this.nodeUpdates) { this.nodeUpdates.forEach((int i) -> this.nodeData.writeNode(UploadStream.INSTANCE.upload(nodeBuffer, i*16L, 16L), i));
this.nodeData.writeNode(UploadStream.INSTANCE.upload(nodeBuffer, i*16L, 16L), i);
}
this.nodeUpdates.clear(); this.nodeUpdates.clear();
return true; return true;
} }

View File

@@ -107,7 +107,7 @@ public class BasicSectionGeometryManager extends AbstractSectionGeometryManager
public void tick() { public void tick() {
//Upload all invalidated bits //Upload all invalidated bits
if (!this.invalidatedSectionIds.isEmpty()) { if (!this.invalidatedSectionIds.isEmpty()) {
for (int id : this.invalidatedSectionIds) { this.invalidatedSectionIds.forEach((int id)-> {
var meta = this.sectionMetadata.get(id); var meta = this.sectionMetadata.get(id);
long ptr = UploadStream.INSTANCE.upload(this.sectionMetadataBuffer, (long) id *SECTION_METADATA_SIZE, SECTION_METADATA_SIZE); long ptr = UploadStream.INSTANCE.upload(this.sectionMetadataBuffer, (long) id *SECTION_METADATA_SIZE, SECTION_METADATA_SIZE);
if (meta == null) {//We need to clear the gpu side buffer if (meta == null) {//We need to clear the gpu side buffer
@@ -115,7 +115,7 @@ public class BasicSectionGeometryManager extends AbstractSectionGeometryManager
} else { } else {
meta.writeMetadata(ptr); meta.writeMetadata(ptr);
} }
} });
this.invalidatedSectionIds.clear(); this.invalidatedSectionIds.clear();
UploadStream.INSTANCE.commit(); UploadStream.INSTANCE.commit();
} }