Fix several mixins for 1.16
This commit is contained in:
+4
-1
@@ -48,6 +48,9 @@ public class MixinThreadingDetector {
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
||||
@Mixin(ServerLevel.class)
|
||||
public class MixinThreadingDectector {} //FIXME: Is there some way to make this file just not be added?
|
||||
public class MixinThreadingDetector { } //FIXME: Is there some way to make this file just not be added?
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -81,11 +81,11 @@ public class SodiumAccessor implements ISodiumAccessor {
|
||||
}
|
||||
#else
|
||||
@Override
|
||||
public HashSet<DHChunkPos> getNormalRenderedChunks() {
|
||||
public HashSet<DhChunkPos> getNormalRenderedChunks() {
|
||||
SodiumWorldRenderer renderer = SodiumWorldRenderer.getInstance();
|
||||
LevelAccessor height = Minecraft.getInstance().level;
|
||||
// TODO: Maybe use a mixin to make this more efficient
|
||||
return MC_RENDER.getMaximumRenderedChunks().stream().filter((DHChunkPos chunk) -> {
|
||||
return MC_RENDER.getMaximumRenderedChunks().stream().filter((DhChunkPos chunk) -> {
|
||||
FakeChunkEntity AABB = new FakeChunkEntity(chunk.getX(), chunk.getZ(), height.getMaxBuildHeight());
|
||||
return (renderer.isEntityVisible(AABB));
|
||||
}).collect(Collectors.toCollection(HashSet::new));
|
||||
|
||||
+2
-1
@@ -47,6 +47,7 @@ public class MixinThreadingDetector {
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
@Mixin(ChunkGenerator.class)
|
||||
public class MixinThreadingDectector {}
|
||||
#endif
|
||||
Reference in New Issue
Block a user