Skip to content

Commit be60945

Browse files
committed
Update a few TODOs
1 parent 6e1e723 commit be60945

File tree

8 files changed

+6
-17
lines changed

8 files changed

+6
-17
lines changed

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ val FABRIC_LOADER_VERSION by extra { "0.16.9" }
1515
val FABRIC_API_VERSION by extra { "0.107.3+1.21.3" }
1616

1717
// This value can be set to null to disable Parchment.
18-
// TODO: Add Parchment
1918
val PARCHMENT_VERSION by extra { null }
2019

2120
// https://semver.org/

common/src/main/java/net/caffeinemc/mods/lithium/common/ai/pathing/PathNodeCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static PathType getNodeTypeFromNeighbors(PathfindingContext context, int
7575
// section is empty or contains any dangerous blocks within the palette. If not, we can assume any checks
7676
// against this chunk section will always fail, allowing us to fast-exit.
7777
if (section == null || PathNodeCache.isSectionSafeAsNeighbor(section)) {
78-
return fallback; //TODO side effects of vanilla's path node caching
78+
return fallback; //TODO side effects of vanilla's path node caching (PathTypeCache maybe has broken invalidation for barely loaded chunks)
7979
}
8080
}
8181

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.caffeinemc.mods.lithium.common.block;
22

33
import net.caffeinemc.mods.lithium.common.tracking.block.SectionedBlockChangeTracker;
4-
import net.minecraft.core.SectionPos;
54
import net.minecraft.world.level.Level;
65

76
public interface BlockListeningSection {
@@ -10,5 +9,4 @@ public interface BlockListeningSection {
109

1110
void lithium$removeFromCallback(ListeningBlockStatePredicate blockGroup, SectionedBlockChangeTracker tracker);
1211

13-
void lithium$invalidateListeningSection(SectionPos sectionPos);
1412
}

common/src/main/java/net/caffeinemc/mods/lithium/common/entity/LithiumEntityCollisions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ public static VoxelShape getWorldBorderCollision(CollisionGetter collisionView,
212212
//Technically, the supporting block that vanilla calculates and caches is not always the one
213213
// that cancels the downwards motion, but usually it is, and this is only for a quick, additional test.
214214
//TODO: This may lead to the movement attempt not creating any chunk load tickets.
215-
// Entities and pistons **probably** create these tickets elsewhere anyways.
215+
// Entities and pistons **probably** create these tickets elsewhere anyways. This probably also applies
216+
// to usages of ChunkAwareBlockCollisionSweeper and others
216217
VoxelShape voxelShape = supportingBlockCollisionShapeProvider.lithium$getCollisionShapeBelow();
217218
if (voxelShape != null) {
218219
return voxelShape;

common/src/main/java/net/caffeinemc/mods/lithium/common/tracking/block/SectionedBlockChangeTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class SectionedBlockChangeTracker {
2323
private long maxChangeTime;
2424

2525
private int timesRegistered;
26-
//Some sections may not exist / be unloaded. We have to be aware of those. //TODO Invalidation when sections / chunks unload (but the entity does not (?), not sure whether this is possible) -> might be possible with entities riding lazy loaded vehicles and pushed to different chunks
26+
//Some sections may not exist / be unloaded. We have to be aware of those.
2727
boolean isListeningToAll = false;
2828
private ArrayList<SectionPos> sectionsNotListeningTo = null;
2929
private ArrayList<BlockListeningSection> sectionsUnsubscribed = null;

common/src/main/java/net/caffeinemc/mods/lithium/common/world/chunk/ChunkStatusTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void onChunkAccessible(ServerLevel serverLevel, LevelChunk levelCh
4949
throw new IllegalStateException("ChunkStatusTracker.onChunkAccessible called on wrong thread!");
5050
}
5151

52-
for (int i = 0; i < LOAD_CALLBACKS.size(); i++) { //TODO confirm this is only called on the server thread...
52+
for (int i = 0; i < LOAD_CALLBACKS.size(); i++) {
5353
LOAD_CALLBACKS.get(i).accept(serverLevel, levelChunk);
5454
}
5555
}

common/src/main/java/net/caffeinemc/mods/lithium/mixin/block/hopper/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* and modification counter comparisons make sure that no outdated cached information is used while avoiding quadratic
55
* runtime.
66
* <p>
7-
* TODO: This section can be expended to include a lot more details. The README.md in this package includes a detailed description.
7+
* TODO: This section can be expended to include a lot more details. The README.md in this package includes a detailed description. Needs updating as some stuff doesn't work on neoforge (inventory entity tracking)
88
*/
99
@MixinConfigOption(
1010
description = "Reduces hopper lag using caching, notification systems and BlockEntity sleeping",

common/src/main/java/net/caffeinemc/mods/lithium/mixin/util/block_tracking/LevelChunkSectionMixin.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import net.caffeinemc.mods.lithium.common.block.*;
44
import net.caffeinemc.mods.lithium.common.tracking.block.ChunkSectionChangeCallback;
55
import net.caffeinemc.mods.lithium.common.tracking.block.SectionedBlockChangeTracker;
6-
import net.minecraft.core.SectionPos;
76
import net.minecraft.network.FriendlyByteBuf;
87
import net.minecraft.world.level.Level;
98
import net.minecraft.world.level.block.state.BlockState;
@@ -162,12 +161,4 @@ private void updateFlagCounters(int x, int y, int z, BlockState newState, boolea
162161
}
163162
}
164163

165-
@Override
166-
@Unique
167-
public void lithium$invalidateListeningSection(SectionPos sectionPos) {
168-
if (this.listeningMask != 0) {
169-
this.changeListener.onChunkSectionInvalidated(sectionPos);
170-
this.listeningMask = 0;
171-
}
172-
}
173164
}

0 commit comments

Comments
 (0)