Skip to content

Commit d95daf7

Browse files
CursedFlamesNotStirred
authored andcommitted
fix @nullable positioning
1 parent f0a545e commit d95daf7

File tree

22 files changed

+67
-67
lines changed

22 files changed

+67
-67
lines changed

src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/cube/RenderCubeRegion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public RenderCubeRegion(
4949
.getFluidState();
5050
}
5151

52-
@Nullable @Override public BlockEntity getBlockEntity(BlockPos pos) {
52+
@Override public @Nullable BlockEntity getBlockEntity(BlockPos pos) {
5353
return this.getCube(Coords.blockToCube(pos.getX()), Coords.blockToCube(pos.getY()), Coords.blockToCube(pos.getZ())).getBlockEntity(pos);
5454
}
5555

src/main/java/io/github/opencubicchunks/cubicchunks/config/ServerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private static void createConfig(Path worldFolder) {
8686
write(configPath, createDefaultConfig());
8787
}
8888

89-
// @Nullable public static ServerConfig getConfig(LevelStorageSource.LevelStorageAccess levelStorageAccess) {
89+
// public static @Nullable ServerConfig getConfig(LevelStorageSource.LevelStorageAccess levelStorageAccess) {
9090
// File configPath = getConfigPath(((LevelStorageAccessAccess) levelStorageAccess).getLevelPath());
9191
// if (configPath.exists()) {
9292
// var config = createDefaultConfig();

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/ASMConfigPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public ASMConfigPlugin() {
134134

135135
@Override public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {}
136136

137-
@Nullable @Override public List<String> getMixins() {
137+
@Override public @Nullable List<String> getMixins() {
138138
return null;
139139
}
140140

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/renderer/MixinSectionOcclusionGraph.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@Mixin(SectionOcclusionGraph.class)
3333
public abstract class MixinSectionOcclusionGraph {
3434
private boolean cc_isCubic = false;
35-
@Shadow @Nullable private ViewArea viewArea;
35+
@Shadow private @Nullable ViewArea viewArea;
3636

3737
@Shadow protected abstract boolean isInViewDistance(long centerSectionPos, long sectionPos);
3838

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/renderer/chunk/MixinRenderRegionCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class MixinRenderRegionCache implements CubicRenderRegionCache {
3535
@Shadow private final Long2ObjectMap<RenderRegionCacheCubeInfo> chunkInfoCache = new Long2ObjectOpenHashMap<>();
3636

3737
// TODO can we possibly do this with DASM + mixin? probably not?
38-
@Override @Nullable public RenderCubeRegion cc_createRegion(Level level, SectionPos sectionPos, boolean nullForEmpty) {
38+
@Override public @Nullable RenderCubeRegion cc_createRegion(Level level, SectionPos sectionPos, boolean nullForEmpty) {
3939
int centerCubeX = Coords.sectionToCube(sectionPos.getX());
4040
int centerCubeY = Coords.sectionToCube(sectionPos.getY());
4141
int centerCubeZ = Coords.sectionToCube(sectionPos.getZ());

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/renderer/chunk/MixinSectionRenderDispatcher$RenderSection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private void cc_onHasAllNeighbors(CallbackInfoReturnable<Boolean> cir) {
7777
* RenderChunkRegion)
7878
*/
7979
@WrapOperation(method = "createCompileTask", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/chunk/RenderRegionCache;createRegion(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/SectionPos;Z)Lnet/minecraft/client/renderer/chunk/RenderChunkRegion;"))
80-
@Nullable private RenderChunkRegion cc_onCreateCompileTask_createRegion(
80+
private @Nullable RenderChunkRegion cc_onCreateCompileTask_createRegion(
8181
RenderRegionCache instance, Level level, SectionPos sectionPos, boolean bool, Operation<RenderChunkRegion> original
8282
) {
8383
if (!((CanBeCubic) ((SectionRenderDispatcherAccess) this$0).cc_getLevel()).cc_isCubic()) {

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinChunkGenerationTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
public abstract class MixinChunkGenerationTask implements CloGenerationTask {
5454
@Shadow @Final private ChunkPos pos;
5555
@Shadow @Final private GeneratingChunkMap chunkMap;
56-
@Shadow @Nullable private ChunkStatus scheduledStatus;
56+
@Shadow private @Nullable ChunkStatus scheduledStatus;
5757
@Shadow @Final public ChunkStatus targetStatus;
5858
@Shadow private volatile boolean markedForCancellation;
5959
@Shadow @Final private StaticCache2D<GenerationChunkHolder> cache;
@@ -62,7 +62,7 @@ public abstract class MixinChunkGenerationTask implements CloGenerationTask {
6262
// scheduledChunkStatus must be one status higher than the scheduled status for cubes until the target status is reached, to ensure load order
6363
// invariants are preserved
6464
// we use the vanilla field for cube status, since that is the status of the actual cube that is being generated
65-
@Nullable public ChunkStatus cc_scheduledChunkStatus;
65+
public @Nullable ChunkStatus cc_scheduledChunkStatus;
6666
@AddFieldToSets(containers = ChunkToCubeSet.ChunkGenerationTask_redirects.class, field = @FieldSig(type = @Ref(StaticCache2D.class), name = "cache"))
6767
private StaticCache3D<GenerationChunkHolder> cc_cubeCache;
6868

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinChunkHolder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,29 +69,29 @@ public MixinChunkHolder() {
6969
throw new DasmFailedToApply();
7070
}
7171

72-
@Shadow @Nullable public abstract LevelChunk getTickingChunk();
72+
@Shadow public abstract @Nullable LevelChunk getTickingChunk();
7373

7474
@AddTransformToSets(ChunkToCubeSet.ChunkHolder_redirects.class)
7575
@TransformFromMethod(owner = @Ref(ChunkHolder.class), value = @MethodSig("getTickingChunk()Lnet/minecraft/world/level/chunk/LevelChunk;"))
76-
@Nullable public native LevelCube cc_getTickingCube();
76+
public native @Nullable LevelCube cc_getTickingCube();
7777

7878
@AddMethodToSets(containers = ChunkToCloSet.ChunkHolder_redirects.class, method = @MethodSig("getTickingChunk()Lnet/minecraft/world/level/chunk/LevelChunk;"))
79-
@Nullable public LevelClo cc_getTickingClo() {
79+
public @Nullable LevelClo cc_getTickingClo() {
8080
if (cc_cubePos != null) {
8181
return cc_getTickingCube();
8282
}
8383
return (LevelClo) getTickingChunk();
8484
}
8585

86-
@Shadow @Nullable public abstract LevelChunk getChunkToSend();
86+
@Shadow public abstract @Nullable LevelChunk getChunkToSend();
8787

8888
@AddTransformToSets(ChunkToCubeSet.ChunkHolder_redirects.class)
8989
@TransformFromMethod(owner = @Ref(ChunkHolder.class), value = @MethodSig("getChunkToSend()Lnet/minecraft/world/level/chunk/LevelChunk;"))
90-
@Nullable public native LevelCube cc_getCubeToSend();
90+
public native @Nullable LevelCube cc_getCubeToSend();
9191

9292
@AddTransformToSets(ChunkToCloSet.ChunkHolder_redirects.class)
9393
@TransformFromMethod(owner = @Ref(ChunkHolder.class), value = @MethodSig("getChunkToSend()Lnet/minecraft/world/level/chunk/LevelChunk;"))
94-
@Nullable public LevelClo cc_getCloToSend() {
94+
public @Nullable LevelClo cc_getCloToSend() {
9595
if (cc_cubePos != null) {
9696
return cc_getCubeToSend();
9797
}

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinChunkMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private void cc_onGetChunkRangeFuture(
278278
// region [cc_updateCubeScheduling dasm + mixin]
279279
@AddTransformToSets(ChunkToCubeSet.ChunkMap_redirects.class)
280280
@TransformFromMethod(useRedirectSets = ChunkToCubeSet.class, value = @MethodSig("updateChunkScheduling(JILnet/minecraft/server/level/ChunkHolder;I)Lnet/minecraft/server/level/ChunkHolder;"))
281-
@Nullable public native ChunkHolder cc_updateCubeScheduling(long cubePos, int newLevel, @Nullable ChunkHolder holder, int oldLevel);
281+
public native @Nullable ChunkHolder cc_updateCubeScheduling(long cubePos, int newLevel, @Nullable ChunkHolder holder, int oldLevel);
282282

283283
@Inject(method = "updateChunkScheduling", at = @At("HEAD"), cancellable = true)
284284
private void cc_onUpdateChunkScheduling(long cloPos, int newLevel, ChunkHolder holder, int oldLevel, CallbackInfoReturnable<ChunkHolder> cir) {

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinGenerationChunkHolder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ native CompletableFuture<ChunkResult<CubeAccess>> cc_applyCubeStep(
8080
);
8181

8282
@WrapOperation(method = "updateHighestAllowedStatus", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ChunkLevel;generationStatus(I)Lnet/minecraft/world/level/chunk/status/ChunkStatus;"))
83-
@Nullable protected ChunkStatus cc_onUpdateHighestAllowedStatus_generationStatus(int level, Operation<ChunkStatus> original) {
83+
protected @Nullable ChunkStatus cc_onUpdateHighestAllowedStatus_generationStatus(int level, Operation<ChunkStatus> original) {
8484
if (cc_cubePos != null) {
8585
return CubeLevel.cubeGenerationStatus(level);
8686
}
@@ -107,20 +107,20 @@ private ChunkGenerationTask cc_onRescheduleChunkTask_scheduleGenerationTask(
107107

108108
@AddTransformToSets(ChunkToCubeSet.GenerationChunkHolder_redirects.class)
109109
@TransformFromMethod(owner = @Ref(GenerationChunkHolder.class), value = @MethodSig("getChunkIfPresentUnchecked(Lnet/minecraft/world/level/chunk/status/ChunkStatus;)Lnet/minecraft/world/level/chunk/ChunkAccess;"))
110-
@Nullable public native CubeAccess cc_getCubeIfPresentUnchecked(ChunkStatus status);
110+
public native @Nullable CubeAccess cc_getCubeIfPresentUnchecked(ChunkStatus status);
111111

112112
@AddTransformToSets(ChunkToCubeSet.GenerationChunkHolder_redirects.class)
113113
@TransformFromMethod(owner = @Ref(GenerationChunkHolder.class), value = @MethodSig("getChunkIfPresent(Lnet/minecraft/world/level/chunk/status/ChunkStatus;)Lnet/minecraft/world/level/chunk/ChunkAccess;"))
114-
@Nullable public native CubeAccess cc_getCubeIfPresent(ChunkStatus status);
114+
public native @Nullable CubeAccess cc_getCubeIfPresent(ChunkStatus status);
115115

116-
@Shadow @Nullable public abstract ChunkAccess getLatestChunk();
116+
@Shadow public abstract @Nullable ChunkAccess getLatestChunk();
117117

118118
@AddTransformToSets(ChunkToCubeSet.GenerationChunkHolder_redirects.class)
119119
@TransformFromMethod(owner = @Ref(GenerationChunkHolder.class), value = @MethodSig("getLatestChunk()Lnet/minecraft/world/level/chunk/ChunkAccess;"))
120-
@Nullable public native CubeAccess cc_getLatestCube();
120+
public native @Nullable CubeAccess cc_getLatestCube();
121121

122122
@AddMethodToSets(containers = ChunkToCloSet.GenerationChunkHolder_redirects.class, method = @MethodSig("getLatestChunk()Lnet/minecraft/world/level/chunk/ChunkAccess;"))
123-
@Nullable public CloAccess cc_getLatestClo() {
123+
public @Nullable CloAccess cc_getLatestClo() {
124124
if (cc_cubePos != null) {
125125
return cc_getLatestCube();
126126
}

0 commit comments

Comments
 (0)