├── .git-blame-ignore-revs ├── .gitattributes ├── .github └── workflows │ ├── cleanupJob.yml │ ├── gradleBuild.yml │ ├── gradleBuildPR.yml │ └── testJob.yml ├── .gitignore ├── .gitmodules ├── .idea └── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── Jenkinsfile ├── LICENSE ├── ModOverworldChunkGeneratorsandCC.md ├── README.md ├── build.gradle ├── build.gradle_old.kts ├── buildSrc ├── build.gradle └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── opencubicchunks │ │ └── gradle │ │ ├── GeneratePackageInfo.java │ │ ├── McGitVersion.java │ │ ├── McGitVersionExtension.java │ │ ├── MixinAutoGen.java │ │ ├── MixinGenExtension.java │ │ └── Utils.java │ └── resources │ └── META-INF │ └── gradle-plugins │ ├── io.github.opencubicchunks.gradle.asmstubs.properties │ ├── io.github.opencubicchunks.gradle.mcGitVersion.properties │ ├── io.github.opencubicchunks.gradle.merged-mappings.properties │ └── io.github.opencubicchunks.gradle.mixingen.properties ├── config └── checkstyle │ ├── checkstyle.xml │ └── suppressions.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── javaHeaders.json ├── settings.gradle ├── src ├── main │ ├── java │ │ └── io │ │ │ └── github │ │ │ └── opencubicchunks │ │ │ └── cubicchunks │ │ │ ├── CanBeCubic.java │ │ │ ├── ConstructorSuper.java │ │ │ ├── CubicChunks.java │ │ │ ├── MarkableAsCubic.java │ │ │ ├── client │ │ │ ├── multiplayer │ │ │ │ ├── ClientCubeCache.java │ │ │ │ ├── CubicClientLevel.java │ │ │ │ └── package-info.java │ │ │ └── renderer │ │ │ │ ├── CubicLevelRenderer.java │ │ │ │ ├── CubicViewArea.java │ │ │ │ ├── cube │ │ │ │ ├── CubicRenderRegionCache.java │ │ │ │ ├── RenderCube.java │ │ │ │ ├── RenderCubeRegion.java │ │ │ │ ├── RenderRegionCacheCubeInfo.java │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ ├── config │ │ │ ├── BaseConfig.java │ │ │ ├── CommonConfig.java │ │ │ ├── ServerConfig.java │ │ │ └── package-info.java │ │ │ ├── mixin │ │ │ ├── ASMConfigPlugin.java │ │ │ ├── access │ │ │ │ ├── client │ │ │ │ │ ├── SectionRenderDispatcherAccess.java │ │ │ │ │ ├── ViewAreaAccess.java │ │ │ │ │ └── package-info.java │ │ │ │ └── common │ │ │ │ │ ├── ChunkMapAccess.java │ │ │ │ │ ├── DistanceManagerAccess.java │ │ │ │ │ ├── SectionOcclusionGraph$GraphEventsAccess.java │ │ │ │ │ ├── TicketTypeAccess.java │ │ │ │ │ └── package-info.java │ │ │ ├── core │ │ │ │ └── common │ │ │ │ │ ├── client │ │ │ │ │ ├── gui │ │ │ │ │ │ └── screens │ │ │ │ │ │ │ └── worldselection │ │ │ │ │ │ │ ├── MixinCreateWorldScreen.java │ │ │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── multiplayer │ │ │ │ │ │ ├── MixinClientChunkCache.java │ │ │ │ │ │ ├── MixinClientCubeCache$Storage.java │ │ │ │ │ │ ├── MixinClientLevel.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ └── renderer │ │ │ │ │ │ ├── MixinLevelRenderer.java │ │ │ │ │ │ ├── MixinSectionOcclusionGraph.java │ │ │ │ │ │ ├── MixinViewArea.java │ │ │ │ │ │ ├── chunk │ │ │ │ │ │ ├── MixinRenderRegionCache.java │ │ │ │ │ │ ├── MixinSectionRenderDispatcher$RenderSection.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ │ ├── cube │ │ │ │ │ │ ├── MixinRenderCube.java │ │ │ │ │ │ ├── MixinRenderRegionCacheCubeInfo.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── core │ │ │ │ │ ├── MixinSectionPos.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── movetoforgesourcesetlater │ │ │ │ │ ├── MixinCCEventHooks.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── server │ │ │ │ │ ├── MixinMinecraftServer.java │ │ │ │ │ ├── level │ │ │ │ │ │ ├── MixinChunkHolder.java │ │ │ │ │ │ ├── MixinChunkHolder_Forge.java │ │ │ │ │ │ ├── MixinChunkMap$TrackedEntity.java │ │ │ │ │ │ ├── MixinChunkMap.java │ │ │ │ │ │ ├── MixinChunkTaskPriorityQueue.java │ │ │ │ │ │ ├── MixinChunkTaskPriorityQueueSorter.java │ │ │ │ │ │ ├── MixinChunkTicketTracker.java │ │ │ │ │ │ ├── MixinChunkTracker.java │ │ │ │ │ │ ├── MixinCloTrackingView$Positioneed.java │ │ │ │ │ │ ├── MixinCloTrackingView.java │ │ │ │ │ │ ├── MixinDistanceManager.java │ │ │ │ │ │ ├── MixinFixedPlayerDistanceChunkTracker.java │ │ │ │ │ │ ├── MixinPlayerRespawnLogic.java │ │ │ │ │ │ ├── MixinPlayerTicketTracker.java │ │ │ │ │ │ ├── MixinServerChunkCache.java │ │ │ │ │ │ ├── MixinServerLevel.java │ │ │ │ │ │ ├── MixinServerPlayer.java │ │ │ │ │ │ ├── MixinTickingTracker.java │ │ │ │ │ │ ├── package-info.java │ │ │ │ │ │ └── progress │ │ │ │ │ │ │ ├── MixinLoggerChunkProgressListener.java │ │ │ │ │ │ │ ├── MixinProcessorChunkProgressListener.java │ │ │ │ │ │ │ ├── MixinStoringChunkProgressListener.java │ │ │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── network │ │ │ │ │ │ ├── MixinPlayerChunkSender.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ └── package-info.java │ │ │ │ │ └── world │ │ │ │ │ ├── entity │ │ │ │ │ ├── MixinEntity.java │ │ │ │ │ └── package-info.java │ │ │ │ │ └── level │ │ │ │ │ ├── MixinBlockCollisions.java │ │ │ │ │ ├── MixinCubePos.java │ │ │ │ │ ├── MixinLevel.java │ │ │ │ │ ├── MixinLevelReader.java │ │ │ │ │ ├── chunk │ │ │ │ │ ├── MixinChunkAccess.java │ │ │ │ │ ├── MixinChunkSource.java │ │ │ │ │ ├── MixinChunkStatus.java │ │ │ │ │ ├── MixinImposterProtoChunk.java │ │ │ │ │ ├── MixinLevelChunk.java │ │ │ │ │ ├── MixinProtoChunk.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── storage │ │ │ │ │ │ ├── MixinChunkStorage.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── cube │ │ │ │ │ ├── MixinCubeAccess.java │ │ │ │ │ ├── MixinEmptyLevelCube.java │ │ │ │ │ ├── MixinImposterProtoCube.java │ │ │ │ │ ├── MixinLevelCube$BoundTickingBlockEntity.java │ │ │ │ │ ├── MixinLevelCube$RebindableTickingBlockEntityWrapper.java │ │ │ │ │ ├── MixinLevelCube.java │ │ │ │ │ ├── MixinProtoCube.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── lighting │ │ │ │ │ ├── MixinLevelLightEngine.java │ │ │ │ │ └── package-info.java │ │ │ │ │ └── package-info.java │ │ │ ├── dasmsets │ │ │ │ ├── ChunkToCloSet.java │ │ │ │ ├── ChunkToCubeSet.java │ │ │ │ ├── ForgeSet.java │ │ │ │ ├── GlobalSet.java │ │ │ │ ├── SectionPosToChunkSet.java │ │ │ │ ├── SectionPosToCubeSet.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── movetoforgesourcesetlater │ │ │ ├── CCEventHooks.java │ │ │ ├── EventConstructorDelegates.java │ │ │ └── package-info.java │ │ │ ├── network │ │ │ ├── CCClientboundForgetLevelCloPacket.java │ │ │ ├── CCClientboundLevelChunkPacket.java │ │ │ ├── CCClientboundLevelCubePacketData.java │ │ │ ├── CCClientboundLevelCubeWithLightPacket.java │ │ │ ├── CCClientboundSetCubeCacheCenterPacket.java │ │ │ ├── CCNetworkHandler.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── server │ │ │ └── level │ │ │ │ ├── CloCollectorFuture.java │ │ │ │ ├── CloHolder.java │ │ │ │ ├── CloTaskPriorityQueueSorter.java │ │ │ │ ├── CloTrackingView.java │ │ │ │ ├── CubicChunkMap.java │ │ │ │ ├── CubicDistanceManager.java │ │ │ │ ├── CubicServerLevel.java │ │ │ │ ├── CubicTicketType.java │ │ │ │ ├── CubicTickingTracker.java │ │ │ │ ├── ServerCubeCache.java │ │ │ │ ├── package-info.java │ │ │ │ └── progress │ │ │ │ ├── CloProgressListener.java │ │ │ │ └── package-info.java │ │ │ └── world │ │ │ ├── entity │ │ │ ├── EntityCubePosGetter.java │ │ │ └── package-info.java │ │ │ └── level │ │ │ ├── CubicCollisionGetter.java │ │ │ ├── CubicLevel.java │ │ │ ├── CubicLevelAccessor.java │ │ │ ├── CubicLevelReader.java │ │ │ ├── chunklike │ │ │ ├── CloAccess.java │ │ │ ├── ImposterProtoClo.java │ │ │ ├── LevelClo.java │ │ │ ├── ProtoClo.java │ │ │ └── package-info.java │ │ │ ├── cube │ │ │ ├── CubeAccess.java │ │ │ ├── CubeSource.java │ │ │ ├── EmptyLevelCube.java │ │ │ ├── ImposterProtoCube.java │ │ │ ├── LevelCube.java │ │ │ ├── ProtoCube.java │ │ │ └── package-info.java │ │ │ ├── entity │ │ │ ├── CloStatusUpdateListener.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ └── resources │ │ ├── META-INF │ │ ├── accesstransformer.cfg │ │ └── mods.toml │ │ └── assets │ │ └── cubicchunks │ │ └── lang │ │ └── en_us.json └── test │ ├── java │ └── io │ │ └── github │ │ └── opencubicchunks │ │ └── cubicchunks │ │ ├── integrationtest │ │ └── server │ │ │ └── level │ │ │ ├── IntegrationTestCubicChunkMap.java │ │ │ ├── IntegrationTestServerCubeCache.java │ │ │ └── package-info.java │ │ ├── mixin │ │ └── test │ │ │ ├── client │ │ │ └── multiplayer │ │ │ │ ├── ClientChunkCache$StorageTestAccess.java │ │ │ │ ├── ClientChunkCacheTestAccess.java │ │ │ │ └── package-info.java │ │ │ └── common │ │ │ ├── MixinDefaultAttributesTest.java │ │ │ ├── MixinEntityTest.java │ │ │ ├── MixinLivingEntityTest.java │ │ │ ├── MixinMobTest.java │ │ │ ├── MixinPlayerTest.java │ │ │ ├── package-info.java │ │ │ └── server │ │ │ ├── level │ │ │ ├── ChunkHolderTestAccess.java │ │ │ ├── ChunkMapTestAccess.java │ │ │ ├── ChunkTrackerTestAccess.java │ │ │ ├── CubicDistanceManagerTestAccess.java │ │ │ ├── MinecraftServerTestAccess.java │ │ │ ├── ServerChunkCacheTestAccess.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── test │ │ ├── LongRunTest.java │ │ ├── client │ │ │ ├── multiplayer │ │ │ │ ├── TestClientCubeCache.java │ │ │ │ └── package-info.java │ │ │ └── renderer │ │ │ │ └── cube │ │ │ │ ├── TestRenderCubeRegion.java │ │ │ │ └── package-info.java │ │ ├── misc │ │ │ ├── TestVanillaCubicParity.java │ │ │ └── package-info.java │ │ ├── network │ │ │ ├── TestCCClientboundForgetLevelCloPacket.java │ │ │ ├── TestCCClientboundLevelChunkPacket.java │ │ │ ├── TestCCClientboundLevelCubeWithLightPacket.java │ │ │ ├── TestCCClientboundSetCubeCacheCenterPacket.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── server │ │ │ ├── TestMinecraftServer.java │ │ │ ├── level │ │ │ │ ├── TestCloCollectorFuture.java │ │ │ │ ├── TestCloHolder.java │ │ │ │ ├── TestCloTaskPriorityQueueSorter.java │ │ │ │ ├── TestCloTrackingView.java │ │ │ │ ├── TestCubicChunkMap.java │ │ │ │ ├── TestCubicChunkTracker.java │ │ │ │ ├── TestCubicClientLevel.java │ │ │ │ ├── TestCubicDistanceManager.java │ │ │ │ ├── TestCubicServerLevel.java │ │ │ │ ├── TestCubicTickingTracker.java │ │ │ │ ├── TestPlayerRespawnLogic.java │ │ │ │ ├── TestServerCubeCache.java │ │ │ │ ├── TestServerPlayer.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ └── world │ │ │ ├── entity │ │ │ ├── TestEntity.java │ │ │ └── package-info.java │ │ │ └── level │ │ │ ├── TestBlockCollisions.java │ │ │ ├── TestCubicLevel.java │ │ │ ├── TestCubicLevelReader.java │ │ │ ├── chunklike │ │ │ └── package-info.java │ │ │ ├── cube │ │ │ ├── TestCubeAccess.java │ │ │ ├── TestLevelCube.java │ │ │ ├── TestProtoCube.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ └── testutils │ │ ├── BaseTest.java │ │ ├── CloseableReference.java │ │ ├── Misc.java │ │ └── package-info.java │ └── resources │ └── fabric.mod.json └── src_old ├── debug ├── java │ └── io │ │ └── github │ │ └── opencubicchunks │ │ └── cubicchunks │ │ └── debug │ │ └── DebugVulkan.java └── resources │ └── shaders │ ├── compile.bat │ ├── frag.spv │ ├── fragment.glsl │ ├── vert.spv │ └── vertex.glsl ├── main ├── java │ └── io │ │ └── github │ │ └── opencubicchunks │ │ └── cubicchunks │ │ ├── CubicChunks.java │ │ ├── chunk │ │ ├── VerticalViewDistanceListener.java │ │ ├── entity │ │ │ ├── ChunkEntityStateEventHandler.java │ │ │ ├── ChunkEntityStateEventSource.java │ │ │ ├── IsCubicEntityContext.java │ │ │ └── package-info.java │ │ └── package-info.java │ │ ├── client │ │ ├── gui │ │ │ └── screens │ │ │ │ ├── CubicLevelLoadingScreen.java │ │ │ │ └── package-info.java │ │ ├── multiplayer │ │ │ ├── ClientCubeCache.java │ │ │ ├── ClientCubeCacheStorage.java │ │ │ ├── CubicClientLevel.java │ │ │ └── package-info.java │ │ └── package-info.java │ │ ├── config │ │ ├── BaseConfig.java │ │ ├── CommonConfig.java │ │ ├── ServerConfig.java │ │ └── package-info.java │ │ ├── debug │ │ ├── DebugVisualization.java │ │ └── package-info.java │ │ ├── levelgen │ │ ├── CubeWorldGenRandom.java │ │ ├── CubeWorldGenRegion.java │ │ ├── CubicNoiseBasedChunkGenerator.java │ │ ├── aquifer │ │ │ ├── AquiferRandom.java │ │ │ ├── AquiferSample.java │ │ │ ├── AquiferSourceSampler.java │ │ │ ├── CubicAquifer.java │ │ │ └── package-info.java │ │ ├── biome │ │ │ ├── BiomeGetter.java │ │ │ ├── StripedBiomeSource.java │ │ │ └── package-info.java │ │ ├── carver │ │ │ ├── CubicCarvingContext.java │ │ │ └── package-info.java │ │ ├── chunk │ │ │ ├── CubeGenerator.java │ │ │ ├── NoiseAndSurfaceBuilderHelper.java │ │ │ └── package-info.java │ │ ├── feature │ │ │ ├── CubicFeature.java │ │ │ ├── CubicFeatures.java │ │ │ ├── LavaLeakFix.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── placement │ │ │ ├── CubicHeightProvider.java │ │ │ ├── CubicLakePlacementModifier.java │ │ │ ├── PeriodicUserFunction.java │ │ │ ├── UserFunction.java │ │ │ └── package-info.java │ │ └── util │ │ │ ├── BlockPosHeightMapDoubleMarker.java │ │ │ ├── CubicWorldGenUtils.java │ │ │ ├── NonAtomicWorldgenRandom.java │ │ │ └── package-info.java │ │ ├── mixin │ │ ├── AnnotationConfigPlugin.java │ │ ├── BeforeInstanceofInjectionPoint.java │ │ ├── CCMixinConnector.java │ │ ├── ClassDuplicator.java │ │ ├── DebugMixinConfig.java │ │ ├── OptiFineMixinConfig.java │ │ ├── TestMixinConfig.java │ │ ├── access │ │ │ ├── client │ │ │ │ ├── ChunkRenderDispatcherAccess.java │ │ │ │ ├── ClientChunkCacheStorageAccess.java │ │ │ │ ├── OptionAccess.java │ │ │ │ ├── ViewAreaAccess.java │ │ │ │ └── package-info.java │ │ │ ├── common │ │ │ │ ├── BiomeGenerationSettingsAccess.java │ │ │ │ ├── BiomeManagerAccess.java │ │ │ │ ├── ChunkHolderAccess.java │ │ │ │ ├── ChunkMapAccess.java │ │ │ │ ├── ChunkMapTrackedEntityAccess.java │ │ │ │ ├── ChunkSerializerAccess.java │ │ │ │ ├── ChunkTicketTrackerFactoryAccess.java │ │ │ │ ├── DistanceManagerAccess.java │ │ │ │ ├── DynamicGraphMinFixedPointAccess.java │ │ │ │ ├── FixedPlayerDistanceChunkTrackerFactoryAccess.java │ │ │ │ ├── HeightmapAccess.java │ │ │ │ ├── IOWorkerAccess.java │ │ │ │ ├── LayerLightSectionStorageAccess.java │ │ │ │ ├── LevelChunkSectionAccess.java │ │ │ │ ├── LevelStorageAccessAccess.java │ │ │ │ ├── LevelTicksAccess.java │ │ │ │ ├── Matrix4fAccess.java │ │ │ │ ├── NaturalSpawnerAccess.java │ │ │ │ ├── NoiseChunkAccess.java │ │ │ │ ├── NoiseGeneratorSettingsAccess.java │ │ │ │ ├── PlayerTicketTrackerFactoryAccess.java │ │ │ │ ├── PoiSectionAccess.java │ │ │ │ ├── ProtoChunkTicksAccess.java │ │ │ │ ├── SavedTickAccess.java │ │ │ │ ├── SortedArraySetAccess.java │ │ │ │ ├── SpawnStateAccess.java │ │ │ │ ├── StructureFeatureManagerAccess.java │ │ │ │ ├── ThreadedLevelLightEngineAccess.java │ │ │ │ ├── TicketAccess.java │ │ │ │ ├── TicketTypeAccess.java │ │ │ │ ├── WorldGenRegionAccess.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── asm │ │ │ └── common │ │ │ │ ├── MixinAsmTarget.java │ │ │ │ └── package-info.java │ │ ├── asmfixes │ │ │ ├── common │ │ │ │ ├── level │ │ │ │ │ ├── NaturalSpawnerFixes.java │ │ │ │ │ └── package-info.java │ │ │ │ └── ticket │ │ │ │ │ ├── DistanceManagerFixes.java │ │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── core │ │ │ ├── client │ │ │ │ ├── MixinClientPacketListener.java │ │ │ │ ├── MixinCreateWorldScreen.java │ │ │ │ ├── MixinMinecraft.java │ │ │ │ ├── MixinOptions.java │ │ │ │ ├── MixinVideoSettingsScreen.java │ │ │ │ ├── chunk │ │ │ │ │ ├── MixinLevelChunk.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── debug │ │ │ │ │ ├── MixinChunkBorderRenderer.java │ │ │ │ │ ├── MixinDebugScreenOverlay.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── entity │ │ │ │ │ ├── MixinTransientEntitySectionManager.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── level │ │ │ │ │ ├── MixinClientChunkCache.java │ │ │ │ │ ├── MixinClientLevel.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ ├── progress │ │ │ │ │ ├── MixinLevelLoadingScreen.java │ │ │ │ │ ├── MixinProcessorChunkProgressListener.java │ │ │ │ │ ├── MixinStoringChunkProgressListener.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── render │ │ │ │ │ ├── MixinGameRenderer.java │ │ │ │ │ ├── MixinLevelRenderer.java │ │ │ │ │ ├── MixinOtherRenderChunk.java │ │ │ │ │ ├── MixinRenderChunk.java │ │ │ │ │ ├── MixinRenderChunkRegion.java │ │ │ │ │ ├── MixinViewArea.java │ │ │ │ │ └── package-info.java │ │ │ │ └── server │ │ │ │ │ ├── MixinIntegratedPlayerList.java │ │ │ │ │ ├── MixinIntegratedServer.java │ │ │ │ │ └── package-info.java │ │ │ ├── common │ │ │ │ ├── MixinBlockPos.java │ │ │ │ ├── MixinMinecraftServer.java │ │ │ │ ├── MixinServerChunkCache.java │ │ │ │ ├── blockentity │ │ │ │ │ ├── MixinBeaconBlockEntity.java │ │ │ │ │ ├── MixinConduitBlockEntity.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── chunk │ │ │ │ │ ├── MixinBulkSectionAccess.java │ │ │ │ │ ├── MixinChunkHolder.java │ │ │ │ │ ├── MixinChunkHolderLevelChangeListener.java │ │ │ │ │ ├── MixinChunkMap.java │ │ │ │ │ ├── MixinChunkSerializer.java │ │ │ │ │ ├── MixinChunkStatus.java │ │ │ │ │ ├── MixinChunkStatusSimpleGenerationTask.java │ │ │ │ │ ├── MixinImposterProtoChunk.java │ │ │ │ │ ├── MixinLevelChunk.java │ │ │ │ │ ├── MixinProtoChunk.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── storage │ │ │ │ │ │ ├── MixinChunkAccess.java │ │ │ │ │ │ ├── MixinEntityStorage.java │ │ │ │ │ │ ├── MixinPoiManager.java │ │ │ │ │ │ ├── MixinSectionStorage.java │ │ │ │ │ │ ├── MixinStructureManager.java │ │ │ │ │ │ ├── MixinStructureTemplatePalette.java │ │ │ │ │ │ └── package-info.java │ │ │ │ ├── entity │ │ │ │ │ ├── MixinPersistentEntitySectionManager.java │ │ │ │ │ ├── MixinServerPlayer.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── storage │ │ │ │ │ │ ├── MixinEntitySectionStorage.java │ │ │ │ │ │ └── package-info.java │ │ │ │ ├── level │ │ │ │ │ ├── MixinChunkSource.java │ │ │ │ │ ├── MixinLevel.java │ │ │ │ │ ├── MixinLevelHeightAccessor.java │ │ │ │ │ ├── MixinLevelReader.java │ │ │ │ │ ├── MixinLocalMobCapCalculator.java │ │ │ │ │ ├── MixinNaturalSpawner.java │ │ │ │ │ ├── MixinNaturalSpawnerSpawnState.java │ │ │ │ │ ├── MixinPlayerRespawnLogic.java │ │ │ │ │ ├── MixinPortalForcer.java │ │ │ │ │ ├── MixinServerLevel.java │ │ │ │ │ ├── MixinWorldGenRegion.java │ │ │ │ │ ├── lighting │ │ │ │ │ │ ├── MixinBlockLightEngine.java │ │ │ │ │ │ ├── MixinDynamicGraphMinFixedPoint.java │ │ │ │ │ │ ├── MixinLayerLightEngine.java │ │ │ │ │ │ ├── MixinLayerLightSectionStorage.java │ │ │ │ │ │ ├── MixinLevelLightEngine.java │ │ │ │ │ │ ├── MixinSkyLightEngine.java │ │ │ │ │ │ ├── MixinSkyLightSectionStorage.java │ │ │ │ │ │ ├── MixinThreadedLevelLightEngine.java │ │ │ │ │ │ └── package-info.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── network │ │ │ │ │ ├── MixinFriendlyByteBuf.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ ├── progress │ │ │ │ │ ├── MixinLoggerChunkProgressListener.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── server │ │ │ │ │ ├── MixinPlayerList.java │ │ │ │ │ └── package-info.java │ │ │ │ └── ticket │ │ │ │ │ ├── MixinDistanceManager.java │ │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── server │ │ │ │ ├── MixinMain.java │ │ │ │ ├── chunk │ │ │ │ ├── MixinLevelChunk.java │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ ├── debug │ │ │ ├── client │ │ │ │ ├── MixinClientLevel.java │ │ │ │ ├── MixinDebugRenderer.java │ │ │ │ ├── MixinHeightMapRenderer.java │ │ │ │ ├── MixinLevelRenderer.java │ │ │ │ ├── MixinMinecraft.java │ │ │ │ ├── MixinMinecraftServer.java │ │ │ │ └── package-info.java │ │ │ └── common │ │ │ │ ├── MixinDistanceManager.java │ │ │ │ ├── MixinMinecraftServer.java │ │ │ │ ├── MixinPlayerRespawnLogic.java │ │ │ │ ├── MixinServerLevel.java │ │ │ │ └── package-info.java │ │ ├── levelgen │ │ │ └── common │ │ │ │ ├── MixinBeardifier.java │ │ │ │ ├── MixinBlendedNoise.java │ │ │ │ ├── MixinChunkGenerator.java │ │ │ │ ├── MixinNoiseChunk.java │ │ │ │ ├── MixinSurfaceSystem.java │ │ │ │ ├── biome │ │ │ │ ├── MixinBiomeDefaultFeatures.java │ │ │ │ ├── MixinBiomeSource.java │ │ │ │ └── package-info.java │ │ │ │ ├── carver │ │ │ │ ├── MixinWorldCarver.java │ │ │ │ └── package-info.java │ │ │ │ ├── feature │ │ │ │ ├── MixinBlockBlobFeature.java │ │ │ │ ├── MixinCocoaDecorator.java │ │ │ │ ├── MixinDesertWellFeature.java │ │ │ │ ├── MixinFossilFeature.java │ │ │ │ ├── MixinIcePatchFeature.java │ │ │ │ ├── MixinIceSpikeFeature.java │ │ │ │ ├── MixinIcebergFeature.java │ │ │ │ ├── MixinLakeFeature.java │ │ │ │ ├── MixinMiscOverworldFeatures.java │ │ │ │ ├── MixinSpringFeature.java │ │ │ │ ├── nether │ │ │ │ │ ├── MixinBasaltPillarFeature.java │ │ │ │ │ ├── MixinHugeFungusFeature.java │ │ │ │ │ ├── MixinReplaceBlobsFeature.java │ │ │ │ │ ├── MixinTwistyVinesFeature.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ └── range │ │ │ │ │ └── package-info.java │ │ │ │ ├── noise │ │ │ │ ├── MixinNoiseBasedChunkGenerator.java │ │ │ │ ├── MixinNoiseRouterData.java │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ ├── placement │ │ │ │ ├── MixinBiasedToBottomHeight.java │ │ │ │ ├── MixinHeightProvider.java │ │ │ │ ├── MixinHeightRangePlacement.java │ │ │ │ ├── MixinPlacementModifier.java │ │ │ │ ├── MixinTrapezoidHeightProvider.java │ │ │ │ ├── package-info.java │ │ │ │ └── verticalanchor │ │ │ │ │ ├── MixinVerticalAnchorAboveBottom.java │ │ │ │ │ ├── MixinVerticalAnchorBelowTop.java │ │ │ │ │ └── package-info.java │ │ │ │ └── structure │ │ │ │ ├── MixinStructureFeature.java │ │ │ │ ├── MixinStructurePiece.java │ │ │ │ ├── package-info.java │ │ │ │ └── pieces │ │ │ │ └── package-info.java │ │ ├── optifine │ │ │ └── client │ │ │ │ └── vanilla │ │ │ │ ├── MixinWorldRenderer_Vanilla.java │ │ │ │ └── package-info.java │ │ ├── package-info.java │ │ └── test │ │ │ └── common │ │ │ └── package-info.java │ │ ├── network │ │ ├── PacketCCLevelInfo.java │ │ ├── PacketCubeBlockChanges.java │ │ ├── PacketCubeCacheRadius.java │ │ ├── PacketCubes.java │ │ ├── PacketDispatcher.java │ │ ├── PacketHeightmap.java │ │ ├── PacketHeightmapChanges.java │ │ ├── PacketUnloadCube.java │ │ ├── PacketUpdateCubePosition.java │ │ ├── PacketUpdateLight.java │ │ └── package-info.java │ │ ├── optifine │ │ ├── IOptiFineChunkRender.java │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── server │ │ ├── level │ │ │ ├── CubeHolder.java │ │ │ ├── CubeHolderLevelChangeListener.java │ │ │ ├── CubeHolderPlayerProvider.java │ │ │ ├── CubeMap.java │ │ │ ├── CubeMapInternal.java │ │ │ ├── CubeTaskPriorityQueue.java │ │ │ ├── CubeTaskPriorityQueueSorter.java │ │ │ ├── CubeTicketTracker.java │ │ │ ├── CubeTickingTracker.java │ │ │ ├── CubeTracker.java │ │ │ ├── CubicDistanceManager.java │ │ │ ├── CubicPlayerTicketTracker.java │ │ │ ├── CubicTicketType.java │ │ │ ├── FixedPlayerDistanceCubeTracker.java │ │ │ ├── HorizontalGraphGroup.java │ │ │ ├── ServerCubeCache.java │ │ │ ├── VerticalGraphGroup.java │ │ │ ├── clo │ │ │ │ ├── CloTaskPriorityQueue.java │ │ │ │ ├── CloTaskPriorityQueueSorter.java │ │ │ │ ├── CloTracker.java │ │ │ │ ├── CubeHolder.java │ │ │ │ ├── CubeHolderLevelChangeListener.java │ │ │ │ ├── CubeHolderPlayerProvider.java │ │ │ │ ├── CubeMap.java │ │ │ │ ├── CubeMapInternal.java │ │ │ │ ├── CubicDistanceManager.java │ │ │ │ └── CubicPlayerTicketTracker.java │ │ │ ├── package-info.java │ │ │ └── progress │ │ │ │ ├── CubeProgressListener.java │ │ │ │ ├── StoringCubeProgressListener.java │ │ │ │ └── package-info.java │ │ └── package-info.java │ │ ├── utils │ │ ├── BufferUtils.java │ │ ├── CubeCollectorFuture.java │ │ ├── MutableHolderSet.java │ │ └── package-info.java │ │ └── world │ │ ├── CubicChunksSavedData.java │ │ ├── CubicLocalMobCapCalculator.java │ │ ├── CubicNaturalSpawner.java │ │ ├── CubicServerTickList.java │ │ ├── DummyHeightmap.java │ │ ├── ForcedCubesSaveData.java │ │ ├── INaturalSpawnerInternal.java │ │ ├── ImposterChunkPos.java │ │ ├── SetupCubeStructureStart.java │ │ ├── level │ │ ├── CubicLevelAccessor.java │ │ ├── CubicLevelReader.java │ │ ├── CubicLevelTicks.java │ │ ├── CubicPersistentEntitySectionManager.java │ │ ├── chunk │ │ │ ├── ColumnCubeGetter.java │ │ │ ├── CubeAccess.java │ │ │ ├── CubeBiomeContainer.java │ │ │ ├── CubeSource.java │ │ │ ├── CubeStatus.java │ │ │ ├── EmptyLevelCube.java │ │ │ ├── ImposterProtoCube.java │ │ │ ├── LevelCube.java │ │ │ ├── LightCubeGetter.java │ │ │ ├── LightHeightmapGetter.java │ │ │ ├── ProtoCube.java │ │ │ ├── package-info.java │ │ │ └── storage │ │ │ │ ├── AsyncSaveData.java │ │ │ │ ├── CubicEntityStorage.java │ │ │ │ ├── CubicSectionStorage.java │ │ │ │ ├── PoiDeserializationContext.java │ │ │ │ └── package-info.java │ │ ├── chunklike │ │ │ ├── CloAccess.java │ │ │ ├── CloPos.java │ │ │ ├── ImposterProtoClo.java │ │ │ ├── LevelClo.java │ │ │ └── ProtoClo.java │ │ ├── levelgen │ │ │ └── heightmap │ │ │ │ ├── ClientLightSurfaceTracker.java │ │ │ │ ├── ClientSurfaceTracker.java │ │ │ │ ├── package-info.java │ │ │ │ └── surfacetrackertree │ │ │ │ ├── LightSurfaceTrackerWrapper.java │ │ │ │ ├── SurfaceTrackerWrapper.java │ │ │ │ └── package-info.java │ │ └── package-info.java │ │ ├── lighting │ │ ├── CubicLayerLightEngine.java │ │ ├── CubicLayerLightSectionStorage.java │ │ ├── CubicLevelLightEngine.java │ │ ├── CubicSkyLightEngine.java │ │ ├── SkyLightColumnChecker.java │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── server │ │ ├── CubicMinecraftServer.java │ │ ├── CubicServerLevel.java │ │ ├── CubicThreadedLevelLightEngine.java │ │ └── package-info.java │ │ └── storage │ │ ├── CubeSerializer.java │ │ ├── RegionCubeIO.java │ │ └── package-info.java └── resources │ ├── META-INF │ └── MANIFEST.MF │ ├── assets │ └── cubicchunks │ │ └── lang │ │ └── en_us.json │ ├── cubicchunks.accesswidener │ ├── cubicchunks.mixins.access.json │ ├── cubicchunks.mixins.asm.json │ ├── cubicchunks.mixins.asmfixes.json │ ├── cubicchunks.mixins.core.json │ ├── cubicchunks.mixins.debug.json │ ├── cubicchunks.mixins.levelgen.json │ ├── cubicchunks.mixins.optifine.json │ ├── cubicchunks.mixins.test.json │ ├── dasm │ ├── sets │ │ └── sets.json │ └── targets.json │ └── fabric.mod.json └── test └── java └── io └── github └── opencubicchunks └── cubicchunks ├── levelgen ├── lighting │ ├── LightingTests.java │ └── package-info.java └── placement │ ├── PeriodicUserFunctionTest.java │ └── package-info.java ├── mock ├── TestBlockGetter.java ├── TestHeightmap.java ├── TestWorld.java ├── interfaces │ ├── BlockGetterLightHeightmapGetterColumnCubeMapGetter.java │ ├── LightCubeChunkGetter.java │ └── package-info.java └── package-info.java ├── testutils ├── ColumnPos.java ├── LightError.java ├── LightSlice.java ├── LightTestUtil.java ├── Result.java └── package-info.java └── utils ├── BufferUtilsTest.java └── package-info.java /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Bartosz Skrzypczak 9/15/21, 4:06 AM Method and field renames, some formatting cleanup 2 | 82a3a28ed9125c99b6b0b6b627ba17e448885751 3 | # Bartosz Skrzypczak 9/14/21, 11:42 PM Class renames part 2, code changes 4 | 8343c021fbfa13bfbeac6998751de0d37c81ed94 5 | # Bartosz Skrzypczak 9/14/21, 11:40 PM Class renames part 1, no code changes 6 | 887db99f1ce95bc8dfc8c8395894a08ca9370242 7 | # Bartosz Skrzypczak 9/14/21, 12:28 AM Move worldgen code to levelgen package 8 | 4d5bdb59b6d96dc62b6508832984315fff5ae846 9 | 10 | # Barteks2x 11/22/20, 2:43 PM Apply code reformat, add checkstyle, checkstyle fixes and include formatter settings files for intellij 11 | 373b95fe3a524b241c1e6e1302a356b7af3d06b2 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Gradle wrapper files are auto-generated 5 | gradlew linguist-generated=true 6 | gradlew.bat linguist-generated=true 7 | gradle/wrapper/** linguist-generated=true 8 | -------------------------------------------------------------------------------- /.github/workflows/cleanupJob.yml: -------------------------------------------------------------------------------- 1 | name: cleanupJob.yml 2 | on: 3 | workflow_call: 4 | 5 | jobs: 6 | cleanup: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - name: Delete temporary artifacts 11 | uses: geekyeggo/delete-artifact@v5 12 | with: 13 | name: post-build-state 14 | -------------------------------------------------------------------------------- /.github/workflows/testJob.yml: -------------------------------------------------------------------------------- 1 | name: testJob.yml 2 | on: 3 | workflow_call: 4 | inputs: 5 | name: 6 | required: true 7 | type: string 8 | command: 9 | required: true 10 | type: string 11 | 12 | jobs: 13 | test: # Expects the build state to be an artifact post-build-state containing a post-build.tar.gz 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - name: Set up JDK 17 18 | uses: actions/setup-java@v1 19 | with: 20 | java-version: 17 21 | 22 | - name: Download post-build state 23 | uses: actions/download-artifact@v4 24 | with: 25 | name: post-build-state 26 | path: . 27 | - name: Untar post-build state 28 | run: tar -xzf post-build.tar.gz 29 | 30 | - name: Run ${{ inputs.name }} 31 | run: ${{ inputs.command }} 32 | 33 | - name: Upload test report 34 | if: always() 35 | uses: actions/upload-artifact@v4 36 | with: 37 | name: ${{ inputs.name }}-reports 38 | path: build/reports/ 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | !.idea/codeStyles/ 3 | # eclipse 4 | bin 5 | *.launch 6 | .settings 7 | .metadata 8 | .classpath 9 | .project 10 | 11 | # idea 12 | out 13 | *.ipr 14 | *.iws 15 | *.iml 16 | 17 | # gradle 18 | build 19 | .gradle 20 | 21 | # other 22 | eclipse 23 | run/ 24 | runs/ 25 | classes 26 | 27 | # Files from Forge MDK 28 | forge*changelog.txt 29 | 30 | # Files generated by ./gradlew check ? 31 | /logs/latest.log 32 | /logs/ 33 | 34 | # Fabric 35 | .fabric 36 | .mixin.out 37 | 38 | # Cubic Chunks generated files 39 | cubicchunks.mixins.*.json 40 | 41 | # Dasm 42 | .dasm.out 43 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "CubicChunksCore"] 2 | path = CubicChunksCore 3 | url = https://github.com/OpenCubicChunks/CubicChunksCore 4 | branch = dev 5 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /buildSrc/build.gradle: -------------------------------------------------------------------------------- 1 | group 'io.github.opencubicchunks.gradle' 2 | version '1.0-SNAPSHOT' 3 | 4 | apply plugin: 'java' 5 | 6 | repositories { 7 | mavenCentral() 8 | gradlePluginPortal() 9 | maven { url = 'https://maven.neoforged.net/releases' } 10 | maven { url = "https://jitpack.io" } 11 | maven { 12 | name = 'ajoberstar-backup' 13 | url = 'https://ajoberstar.org/bintray-backup/' 14 | } 15 | } 16 | 17 | dependencies { 18 | implementation 'org.ow2.asm:asm:9.3' 19 | implementation 'org.ow2.asm:asm-tree:9.1' 20 | implementation 'org.ow2.asm:asm-util:9.1' 21 | implementation 'org.ow2.asm:asm-commons:9.1' 22 | 23 | implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' 24 | implementation "org.ajoberstar.grgit:grgit-core:5.3.0" 25 | } 26 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/io/github/opencubicchunks/gradle/MixinAutoGen.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.gradle; 2 | 3 | import java.io.IOException; 4 | import java.io.UncheckedIOException; 5 | 6 | import javax.annotation.Nonnull; 7 | 8 | import org.gradle.api.Plugin; 9 | import org.gradle.api.Project; 10 | import org.gradle.api.Task; 11 | import org.gradle.api.plugins.JavaPluginConvention; 12 | 13 | public class MixinAutoGen implements Plugin { 14 | 15 | @Override public void apply(@Nonnull Project target) { 16 | MixinGenExtension extension = new MixinGenExtension(); 17 | target.getExtensions().add("mixinGen", extension); 18 | Task generateMixinConfigs = target.getTasks().create("generateMixinConfigs"); 19 | generateMixinConfigs.setGroup("filegen"); 20 | generateMixinConfigs.doLast(task -> { 21 | JavaPluginConvention convention = Utils.getJavaPluginConvention(target); 22 | try { 23 | extension.generateFiles(convention); 24 | } catch (IOException e) { 25 | throw new UncheckedIOException(e); 26 | } 27 | }); 28 | } 29 | } -------------------------------------------------------------------------------- /buildSrc/src/main/java/io/github/opencubicchunks/gradle/Utils.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.gradle; 2 | 3 | import javax.annotation.Nonnull; 4 | 5 | import org.gradle.api.Project; 6 | import org.gradle.api.plugins.JavaPluginConvention; 7 | 8 | public class Utils { 9 | 10 | @Nonnull public static JavaPluginConvention getJavaPluginConvention(@Nonnull Project target) { 11 | JavaPluginConvention convention = target.getConvention().findByType(JavaPluginConvention.class); 12 | if (convention == null) { 13 | convention = target.getConvention().findPlugin(JavaPluginConvention.class); 14 | if (convention == null) { 15 | convention = target.getConvention().getByType(JavaPluginConvention.class); 16 | } 17 | } 18 | return convention; 19 | } 20 | } -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.github.opencubicchunks.gradle.asmstubs.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.github.opencubicchunks.gradle.AsmStubGenerator -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.github.opencubicchunks.gradle.mcGitVersion.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.github.opencubicchunks.gradle.McGitVersion -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.github.opencubicchunks.gradle.merged-mappings.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.github.opencubicchunks.gradle.mergedmappings.MergedMappingsPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.github.opencubicchunks.gradle.mixingen.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.github.opencubicchunks.gradle.MixinAutoGen -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks3/c01634c41dd9741cd589f5a0d14858f610b81e2a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /javaHeaders.json: -------------------------------------------------------------------------------- 1 | { 2 | "implementations": { 3 | "net.minecraft.util.SimpleBitStorage": [ "io.github.opencubicchunks.cc_core.minecraft.MCBitStorage" ], 4 | "net.minecraft.world.level.BlockGetter": [ "io.github.opencubicchunks.cc_core.minecraft.MCBlockGetter" ], 5 | "net.minecraft.core.BlockPos": [ "io.github.opencubicchunks.cc_core.minecraft.MCBlockPos" ], 6 | "net.minecraft.world.level.block.state.BlockState": [ "io.github.opencubicchunks.cc_core.minecraft.MCBlockState" ], 7 | "net.minecraft.world.level.ChunkPos": [ "io.github.opencubicchunks.cc_core.minecraft.MCChunkPos" ], 8 | "net.minecraft.world.entity.Entity": [ "io.github.opencubicchunks.cc_core.minecraft.MCEntity" ], 9 | "net.minecraft.world.level.LevelHeightAccessor": [ "io.github.opencubicchunks.cc_core.minecraft.MCLevelHeightAccessor" ], 10 | "net.minecraft.core.SectionPos": [ "io.github.opencubicchunks.cc_core.minecraft.MCSectionPos" ], 11 | "net.minecraft.core.Vec3i": [ "io.github.opencubicchunks.cc_core.minecraft.MCVec3i" ] 12 | } 13 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenLocal() 4 | gradlePluginPortal() 5 | maven { url = 'https://maven.neoforged.net/releases' } 6 | maven { url = "https://jitpack.io" } 7 | } 8 | } 9 | 10 | plugins { 11 | id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' 12 | } 13 | include ':CubicChunksCore' -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/CanBeCubic.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks; 2 | 3 | public interface CanBeCubic { 4 | boolean cc_isCubic(); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/MarkableAsCubic.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks; 2 | 3 | public interface MarkableAsCubic extends CanBeCubic { 4 | void cc_setCubic(); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/multiplayer/CubicClientLevel.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.multiplayer; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import io.github.opencubicchunks.cubicchunks.world.level.CubicLevel; 5 | 6 | public interface CubicClientLevel extends CubicLevel { 7 | void cc_onCubeLoaded(CubePos cubePos); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/multiplayer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.client.multiplayer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/CubicLevelRenderer.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.renderer; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | 5 | public interface CubicLevelRenderer { 6 | void cc_onCubeLoaded(CubePos cubePos); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/CubicViewArea.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.renderer; 2 | 3 | public interface CubicViewArea { 4 | void cc_repositionCamera(double viewEntityX, double viewEntityY, double viewEntityZ); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/cube/CubicRenderRegionCache.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.renderer.cube; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import net.minecraft.core.BlockPos; 6 | import net.minecraft.world.level.Level; 7 | 8 | public interface CubicRenderRegionCache { 9 | @Nullable RenderCubeRegion cc_createRegion(Level level, BlockPos start, BlockPos end, int padding, boolean nullForEmpty); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/cube/RenderCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.renderer.cube; 2 | 3 | import io.github.notstirred.dasm.api.annotations.selector.Ref; 4 | import io.github.notstirred.dasm.api.annotations.transform.TransformFromClass; 5 | import io.github.opencubicchunks.cubicchunks.mixin.dasmsets.ChunkToCubeSet; 6 | import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; 7 | import net.minecraft.client.renderer.chunk.RenderChunk; 8 | import net.minecraft.core.BlockPos; 9 | import net.minecraft.world.level.block.entity.BlockEntity; 10 | import net.minecraft.world.level.block.state.BlockState; 11 | 12 | // Whole class redirect 13 | @TransformFromClass(value = @Ref(RenderChunk.class), sets = ChunkToCubeSet.class) 14 | public class RenderCube { 15 | // Methods copied by DASM 16 | public RenderCube(LevelCube wrapped) { 17 | throw new IllegalStateException("DASM failed to apply"); 18 | } 19 | public native BlockEntity getBlockEntity(BlockPos pos); 20 | // This method is modified with mixin 21 | public native BlockState getBlockState(BlockPos pos); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/cube/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.client.renderer.cube; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/client/renderer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.client.renderer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/config/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.config; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/SectionRenderDispatcherAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 2 | 3 | import net.minecraft.client.multiplayer.ClientLevel; 4 | import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(SectionRenderDispatcher.class) 9 | public interface SectionRenderDispatcherAccess { 10 | @Accessor("level") ClientLevel cc_getLevel(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/ViewAreaAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 2 | 3 | import net.minecraft.client.renderer.ViewArea; 4 | import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; 5 | import net.minecraft.core.BlockPos; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | 9 | @Mixin(ViewArea.class) 10 | public interface ViewAreaAccess { 11 | @Invoker("getRenderSectionAt") SectionRenderDispatcher.RenderSection cc_invokeGetRenderSectionAt(BlockPos pos); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ChunkMapAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.ChunkHolder; 4 | import net.minecraft.server.level.ChunkMap; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Invoker; 7 | 8 | @Mixin(ChunkMap.class) 9 | public interface ChunkMapAccess { 10 | @Invoker("getChunks") Iterable cc_invokeGetChunks(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/DistanceManagerAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.ChunkTaskPriorityQueueSorter; 4 | import net.minecraft.server.level.DistanceManager; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(DistanceManager.class) 9 | public interface DistanceManagerAccess { 10 | @Accessor("ticketThrottler") ChunkTaskPriorityQueueSorter cc_ticketThrottler(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/SectionOcclusionGraph$GraphEventsAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import it.unimi.dsi.fastutil.longs.LongSet; 4 | import net.minecraft.client.renderer.SectionOcclusionGraph; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(SectionOcclusionGraph.GraphEvents.class) 9 | public interface SectionOcclusionGraph$GraphEventsAccess { 10 | @Accessor("chunksWhichReceivedNeighbors") LongSet cc_chunksWhichReceivedNeighbors(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/TicketTypeAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.Comparator; 4 | import net.minecraft.server.level.TicketType; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Invoker; 7 | 8 | @Mixin(TicketType.class) 9 | public interface TicketTypeAccess { 10 | @Invoker("") static TicketType cc_createNew(String string, Comparator comparator, long timeout) { 11 | throw new Error("Mixin did not apply"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/gui/screens/worldselection/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.gui.screens.worldselection; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/multiplayer/MixinClientCubeCache$Storage.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.multiplayer; 2 | 3 | import io.github.opencubicchunks.cubicchunks.client.multiplayer.ClientCubeCache; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | @Mixin(ClientCubeCache.Storage.class) 8 | public class MixinClientCubeCache$Storage { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/multiplayer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.multiplayer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/renderer/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.renderer.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/renderer/cube/MixinRenderCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.renderer.cube; 2 | 3 | import io.github.opencubicchunks.cc_core.utils.Coords; 4 | import io.github.opencubicchunks.cubicchunks.client.renderer.cube.RenderCube; 5 | import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; 6 | import net.minecraft.core.BlockPos; 7 | import org.spongepowered.asm.mixin.Dynamic; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | // Needed for DASM to apply 13 | @Mixin(RenderCube.class) 14 | public abstract class MixinRenderCube { 15 | /** 16 | * Redirect to use cube section indexing instead of chunk section indexing 17 | */ 18 | @Dynamic @Redirect(method = "getBlockState", at = @At(value = "INVOKE", target = "Lio/github/opencubicchunks/cubicchunks/world/level/cube/LevelCube;getSectionIndex(I)I")) 19 | private int cc_onGetBlockState_SectionIndex(LevelCube instance, int y, BlockPos pos) { 20 | return Coords.blockToIndex(pos); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/renderer/cube/MixinRenderRegionCacheCubeInfo.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.renderer.cube; 2 | 3 | import io.github.opencubicchunks.cubicchunks.client.renderer.cube.RenderRegionCacheCubeInfo; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | @Mixin(RenderRegionCacheCubeInfo.class) 8 | public abstract class MixinRenderRegionCacheCubeInfo { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/renderer/cube/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.renderer.cube; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/client/renderer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.client.renderer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/core/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.core; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/movetoforgesourcesetlater/MixinCCEventHooks.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.movetoforgesourcesetlater; 2 | 3 | import io.github.opencubicchunks.cubicchunks.movetoforgesourcesetlater.CCEventHooks; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | @Mixin(CCEventHooks.class) 8 | public class MixinCCEventHooks { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/movetoforgesourcesetlater/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.movetoforgesourcesetlater; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinChunkTicketTracker.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level; 2 | 3 | import net.minecraft.server.level.DistanceManager; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.injection.At; 6 | import org.spongepowered.asm.mixin.injection.Inject; 7 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 8 | 9 | @Mixin(DistanceManager.ChunkTicketTracker.class) 10 | public abstract class MixinChunkTicketTracker extends MixinChunkTracker { 11 | @Inject(method = "setLevel", at = @At("HEAD")) 12 | private void cc_onSetLevel(long sectionPos, int level, CallbackInfo ci) { 13 | super.cc_onSetLevel(sectionPos, level); 14 | } 15 | // TODO if/when we replace ChunkHolder with a cubic equivalent we'll need mixins here 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinCloTrackingView$Positioneed.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.server.level.CloTrackingView; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | @Mixin(CloTrackingView.Positioned.class) 8 | public class MixinCloTrackingView$Positioneed { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinCloTrackingView.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.server.level.CloTrackingView; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | // TODO won't be necessary once we have dasm.json 8 | @Mixin(CloTrackingView.class) 9 | public interface MixinCloTrackingView { 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/MixinFixedPlayerDistanceChunkTracker.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level; 2 | 3 | import net.minecraft.server.level.DistanceManager; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.injection.At; 6 | import org.spongepowered.asm.mixin.injection.Inject; 7 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 8 | 9 | @Mixin(DistanceManager.FixedPlayerDistanceChunkTracker.class) 10 | public abstract class MixinFixedPlayerDistanceChunkTracker extends MixinChunkTracker { 11 | @Inject(method = "setLevel", at = @At("HEAD")) 12 | private void cc_onSetLevel(long sectionPos, int level, CallbackInfo ci) { 13 | super.cc_onSetLevel(sectionPos, level); 14 | } 15 | 16 | // TODO do we care about dumpChunks? 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/level/progress/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level.progress; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/network/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server.network; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/MixinLevelReader.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.CubicLevelReader; 4 | import net.minecraft.world.level.LevelReader; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | 7 | // Cube equivalents of LevelReader chunk methods are implemented as defaults in CubicLevelReader 8 | @Mixin(LevelReader.class) 9 | public interface MixinLevelReader extends CubicLevelReader {} 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/chunk/MixinImposterProtoChunk.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.chunk; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.ImposterProtoClo; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.LevelClo; 5 | import net.minecraft.world.level.chunk.ImposterProtoChunk; 6 | import net.minecraft.world.level.chunk.LevelChunk; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | 10 | @Mixin(ImposterProtoChunk.class) 11 | public abstract class MixinImposterProtoChunk implements ImposterProtoClo { 12 | @Override public LevelClo cc_getWrappedClo() { 13 | return (LevelClo) this.getWrapped(); 14 | } 15 | 16 | @Shadow public abstract LevelChunk getWrapped(); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/chunk/MixinLevelChunk.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.chunk; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.LevelClo; 4 | import net.minecraft.world.level.chunk.LevelChunk; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | 7 | @Mixin(LevelChunk.class) 8 | public abstract class MixinLevelChunk implements LevelClo { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/chunk/MixinProtoChunk.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.chunk; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.ProtoClo; 4 | import net.minecraft.world.level.chunk.ProtoChunk; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | 7 | // Needed to add the ProtoClo interface 8 | @Mixin(ProtoChunk.class) 9 | public abstract class MixinProtoChunk implements ProtoClo { 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/chunk/storage/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.chunk.storage; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/MixinCubeAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.cube.CubeAccess; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | @Mixin(CubeAccess.class) 8 | public class MixinCubeAccess { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/MixinEmptyLevelCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.cube.EmptyLevelCube; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | // Needed for DASM to apply 7 | @Mixin(EmptyLevelCube.class) 8 | public abstract class MixinEmptyLevelCube extends MixinLevelCube { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/MixinImposterProtoCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.ImposterProtoClo; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.LevelClo; 5 | import io.github.opencubicchunks.cubicchunks.world.level.cube.ImposterProtoCube; 6 | import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; 7 | import org.spongepowered.asm.mixin.Dynamic; 8 | import org.spongepowered.asm.mixin.Final; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Shadow; 11 | 12 | // Needed for DASM to apply 13 | @Mixin(ImposterProtoCube.class) 14 | public abstract class MixinImposterProtoCube extends MixinProtoCube implements ImposterProtoClo { 15 | // Field generated by DASM 16 | @Dynamic @Shadow @Final private LevelCube wrapped; 17 | 18 | @Override public LevelClo cc_getWrappedClo() { 19 | return this.wrapped; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/MixinLevelCube$BoundTickingBlockEntity.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 2 | 3 | import org.spongepowered.asm.mixin.Mixin; 4 | 5 | // Needed for DASM to apply 6 | @Mixin(targets = "io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube$BoundTickingBlockEntity") 7 | public class MixinLevelCube$BoundTickingBlockEntity { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/MixinLevelCube$RebindableTickingBlockEntityWrapper.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 2 | 3 | import org.spongepowered.asm.mixin.Mixin; 4 | 5 | // Needed for DASM to apply 6 | @Mixin(targets = "io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube$RebindableTickingBlockEntityWrapper") 7 | public class MixinLevelCube$RebindableTickingBlockEntityWrapper { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/MixinProtoCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 2 | 3 | import io.github.opencubicchunks.cc_core.utils.Coords; 4 | import io.github.opencubicchunks.cubicchunks.world.level.cube.ProtoCube; 5 | import net.minecraft.core.BlockPos; 6 | import org.spongepowered.asm.mixin.Dynamic; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | // Needed for DASM to apply 12 | @Mixin(ProtoCube.class) 13 | public abstract class MixinProtoCube extends MixinCubeAccess { 14 | /** 15 | * Redirect to use cube section indexing instead of chunk section indexing 16 | */ 17 | @Dynamic @Redirect(method = {"markPosForPostprocessing", "cc_dasm$getBlockState", "cc_dasm$getFluidState"}, at = @At(value = "INVOKE", target = "Lio/github/opencubicchunks/cubicchunks" 18 | + "/world/level/cube/ProtoCube;getSectionIndex(I)I")) 19 | private int cc_onGetBlockState_SectionIndex(ProtoCube instance, int i, BlockPos pos) { 20 | return Coords.blockToIndex(pos); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/cube/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.cube; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/lighting/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level.lighting; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/world/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.world.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/dasmsets/SectionPosToChunkSet.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.dasmsets; 2 | 3 | import io.github.notstirred.dasm.api.annotations.redirect.redirects.MethodRedirect; 4 | import io.github.notstirred.dasm.api.annotations.redirect.sets.IntraOwnerContainer; 5 | import io.github.notstirred.dasm.api.annotations.redirect.sets.RedirectSet; 6 | import io.github.notstirred.dasm.api.annotations.selector.MethodSig; 7 | import io.github.notstirred.dasm.api.annotations.selector.Ref; 8 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 9 | import net.minecraft.core.SectionPos; 10 | 11 | /** 12 | * Replaces {@link SectionPos}.chunk() in dasm-copied code in cases where a chunk position should still be returned, not a cube position. 13 | */ 14 | @RedirectSet 15 | public interface SectionPosToChunkSet { 16 | @IntraOwnerContainer(owner = @Ref(SectionPos.class)) 17 | abstract class SectionPos_redirects { 18 | @MethodRedirect(@MethodSig("chunk()Lnet/minecraft/world/level/ChunkPos;")) 19 | public native CloPos cc_chunk(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/dasmsets/SectionPosToCubeSet.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.dasmsets; 2 | 3 | import io.github.notstirred.dasm.api.annotations.redirect.redirects.MethodRedirect; 4 | import io.github.notstirred.dasm.api.annotations.redirect.sets.IntraOwnerContainer; 5 | import io.github.notstirred.dasm.api.annotations.redirect.sets.RedirectSet; 6 | import io.github.notstirred.dasm.api.annotations.selector.MethodSig; 7 | import io.github.notstirred.dasm.api.annotations.selector.Ref; 8 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 9 | import net.minecraft.core.SectionPos; 10 | 11 | /** 12 | * Replaces {@link SectionPos}.chunk() in dasm-copied code in cases where a cube position should be returned, rather than a chunk position. 13 | */ 14 | @RedirectSet 15 | public interface SectionPosToCubeSet { 16 | @IntraOwnerContainer(owner = @Ref(SectionPos.class)) 17 | abstract class SectionPos_redirects { 18 | @MethodRedirect(@MethodSig("chunk()Lnet/minecraft/world/level/ChunkPos;")) 19 | public native CloPos cc_cube(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/dasmsets/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.dasmsets; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/mixin/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/movetoforgesourcesetlater/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.movetoforgesourcesetlater; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/network/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.network; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/CloTaskPriorityQueueSorter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import java.util.function.IntConsumer; 4 | import java.util.function.IntSupplier; 5 | 6 | import io.github.opencubicchunks.cc_core.annotation.UsedFromASM; 7 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 8 | 9 | public interface CloTaskPriorityQueueSorter { 10 | @UsedFromASM 11 | void cc_onLevelChange(CloPos cloPos, IntSupplier p_140617_, int p_140618_, IntConsumer p_140619_); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubicChunkMap.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import net.minecraft.server.level.ServerPlayer; 4 | 5 | public interface CubicChunkMap { 6 | boolean cc_isChunkTracked(ServerPlayer player, int x, int y, int z); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubicServerLevel.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import io.github.opencubicchunks.cc_core.annotation.UsedFromASM; 4 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 5 | import io.github.opencubicchunks.cubicchunks.world.level.CubicLevel; 6 | 7 | public interface CubicServerLevel extends CubicLevel { 8 | @UsedFromASM 9 | boolean isNaturalSpawningAllowed(CloPos cloPos); 10 | 11 | @UsedFromASM 12 | void invalidateCapabilities(CloPos cloPos); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubicTickingTracker.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import io.github.opencubicchunks.cc_core.annotation.UsedFromASM; 4 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 5 | import net.minecraft.server.level.TicketType; 6 | 7 | public interface CubicTickingTracker { 8 | @UsedFromASM 9 | void cc_addTicket(TicketType type, CloPos cloPos, int ticketLevel, T key); 10 | 11 | @UsedFromASM 12 | void cc_removeTicket(TicketType type, CloPos cloPos, int ticketLevel, T key); 13 | 14 | int cc_getLevel(CloPos cloPos); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.server.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/progress/CloProgressListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level.progress; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 6 | import net.minecraft.world.level.chunk.ChunkStatus; 7 | 8 | public interface CloProgressListener { 9 | void cc_updateSpawnPos(CloPos center); 10 | 11 | void cc_onStatusChange(CloPos chunkPosition, @Nullable ChunkStatus newStatus); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/server/level/progress/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.server.level.progress; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/entity/EntityCubePosGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.entity; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | 5 | public interface EntityCubePosGetter { 6 | CubePos cc_cubePosition(); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/CubicCollisionGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import net.minecraft.world.level.BlockGetter; 6 | 7 | public interface CubicCollisionGetter { 8 | @Nullable BlockGetter cc_getCubeForCollisions(int cubeX, int cubeY, int cubeZ); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/CubicLevel.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; 4 | import net.minecraft.core.BlockPos; 5 | 6 | public interface CubicLevel extends CubicLevelAccessor { 7 | LevelCube cc_getCubeAt(BlockPos blockPos); 8 | LevelCube cc_getCube(int x, int y, int z); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/CubicLevelAccessor.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.cube.CubeSource; 4 | 5 | public interface CubicLevelAccessor extends CubicLevelReader { 6 | CubeSource cc_getCubeSource(); 7 | 8 | @Override 9 | default boolean cc_hasCube(int cubeX, int cubeY, int cubeZ) { 10 | return this.cc_getCubeSource().cc_hasCube(cubeX, cubeY, cubeZ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunklike/ImposterProtoClo.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunklike; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.cube.ImposterProtoCube; 4 | import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; 5 | import net.minecraft.world.level.chunk.ImposterProtoChunk; 6 | import net.minecraft.world.level.chunk.LevelChunk; 7 | 8 | public interface ImposterProtoClo extends ProtoClo { 9 | static ImposterProtoClo create(LevelClo wrapped, boolean allowWrites) { 10 | if (wrapped instanceof LevelCube cube) { 11 | return new ImposterProtoCube(cube, allowWrites); 12 | } else { 13 | return (ImposterProtoClo) new ImposterProtoChunk(((LevelChunk) wrapped), allowWrites); 14 | } 15 | } 16 | 17 | LevelClo cc_getWrappedClo(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunklike/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.chunklike; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/cube/CubeSource.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.cube; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import net.minecraft.world.level.chunk.ChunkStatus; 7 | 8 | public interface CubeSource { 9 | @Nullable CubeAccess cc_getCube(int x, int y, int z, ChunkStatus status, boolean forceLoad); 10 | 11 | @Nullable LevelCube cc_getCube(int x, int y, int z, boolean forceLoad); 12 | 13 | @Nullable LevelCube cc_getCubeNow(int x, int y, int z); 14 | 15 | // TODO: Phase 2 - getCubeForLighting 16 | 17 | boolean cc_hasCube(int x, int y, int z); 18 | 19 | int cc_getLoadedCubeCount(); 20 | 21 | void cc_updateCubeForced(CubePos cubePos, boolean forced); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/cube/EmptyLevelCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.cube; 2 | 3 | import io.github.notstirred.dasm.api.annotations.selector.Ref; 4 | import io.github.notstirred.dasm.api.annotations.transform.TransformFromClass; 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import io.github.opencubicchunks.cubicchunks.mixin.dasmsets.ChunkToCubeSet; 7 | import net.minecraft.core.Holder; 8 | import net.minecraft.world.level.Level; 9 | import net.minecraft.world.level.biome.Biome; 10 | import net.minecraft.world.level.chunk.EmptyLevelChunk; 11 | 12 | // Whole class redirect 13 | @TransformFromClass(value = @Ref(EmptyLevelChunk.class), sets = ChunkToCubeSet.class) 14 | public class EmptyLevelCube extends LevelCube { 15 | public EmptyLevelCube(Level level, CubePos pos, Holder biome) { 16 | super(level, pos); 17 | throw new IllegalStateException("DASM failed to apply"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/cube/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.cube; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/entity/CloStatusUpdateListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.entity; 2 | 3 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 4 | import net.minecraft.server.level.FullChunkStatus; 5 | 6 | @FunctionalInterface 7 | public interface CloStatusUpdateListener { 8 | void onChunkStatusChange(CloPos chunkPos, FullChunkStatus fullChunkStatus); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/io/github/opencubicchunks/cubicchunks/world/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/cubicchunks/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "selectWorld.cubicChunks": "Use Cubic Chunks" 3 | } -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/integrationtest/server/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.integrationtest.server.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/client/multiplayer/ClientChunkCache$StorageTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.client.multiplayer; 2 | 3 | import net.minecraft.client.multiplayer.ClientChunkCache; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Invoker; 6 | 7 | @Mixin(ClientChunkCache.Storage.class) 8 | public interface ClientChunkCache$StorageTestAccess { 9 | @Invoker("inRange") boolean invokeInRange(int x, int z); 10 | } 11 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/client/multiplayer/ClientChunkCacheTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.client.multiplayer; 2 | 3 | import io.github.opencubicchunks.cubicchunks.client.multiplayer.ClientCubeCache; 4 | import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; 5 | import net.minecraft.client.multiplayer.ClientChunkCache; 6 | import org.spongepowered.asm.mixin.Dynamic; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.gen.Accessor; 9 | 10 | @Mixin(ClientChunkCache.class) 11 | public interface ClientChunkCacheTestAccess { 12 | @Dynamic @Accessor("cc_cubeStorage") ClientCubeCache.Storage cubeStorage(); 13 | @Dynamic @Accessor("cc_emptyCube") LevelCube emptyCube(); 14 | @Accessor("storage") ClientChunkCache.Storage chunkStorage(); 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/client/multiplayer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.test.client.multiplayer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/MixinMobTest.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common; 2 | 3 | import net.minecraft.world.entity.Mob; 4 | import net.minecraft.world.entity.ai.attributes.AttributeSupplier; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 9 | 10 | // TODO: Remove this mixin class when NeoForge supports JUnit for tests 11 | // This mixin class is only required due to NeoForge not supporting JUnit for testing yet (a workaround is currently used, involving Loom) 12 | @Mixin(Mob.class) 13 | public abstract class MixinMobTest { 14 | @Inject(method = "createMobAttributes", at = @At(value = "HEAD"), cancellable = true) 15 | private static void cubic_chunks_3$fixNeoForgeErrors(CallbackInfoReturnable cir) { 16 | cir.setReturnValue(AttributeSupplier.builder()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/MixinPlayerTest.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common; 2 | 3 | import net.minecraft.world.entity.ai.attributes.AttributeSupplier; 4 | import net.minecraft.world.entity.player.Player; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 9 | 10 | // TODO: Remove this mixin class when NeoForge supports JUnit for tests 11 | // This mixin class is only required due to NeoForge not supporting JUnit for testing yet (a workaround is currently used, involving Loom) 12 | @Mixin(Player.class) 13 | public abstract class MixinPlayerTest { 14 | @Inject(method = "createAttributes", at = @At(value = "HEAD"), cancellable = true) 15 | private static void cubic_chunks_3$fixNeoForgeErrors(CallbackInfoReturnable cir) { 16 | cir.setReturnValue(AttributeSupplier.builder()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.test.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/level/ChunkHolderTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server.level; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | 5 | import com.mojang.datafixers.util.Either; 6 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.CloAccess; 7 | import net.minecraft.server.level.ChunkHolder; 8 | import net.minecraft.server.level.ChunkMap; 9 | import net.minecraft.world.level.chunk.ChunkStatus; 10 | import org.spongepowered.asm.mixin.Dynamic; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.gen.Invoker; 13 | 14 | @Mixin(ChunkHolder.class) 15 | public interface ChunkHolderTestAccess { 16 | @Dynamic @Invoker CompletableFuture> invokeCc_GetOrScheduleFuture(ChunkStatus status, ChunkMap map); 17 | } 18 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/level/ChunkTrackerTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server.level; 2 | 3 | import it.unimi.dsi.fastutil.ints.IntSet; 4 | import it.unimi.dsi.fastutil.longs.Long2ObjectMap; 5 | import net.minecraft.server.level.ChunkTracker; 6 | import org.spongepowered.asm.mixin.Dynamic; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.gen.Accessor; 9 | import org.spongepowered.asm.mixin.gen.Invoker; 10 | 11 | @Mixin(ChunkTracker.class) 12 | public interface ChunkTrackerTestAccess { 13 | @Dynamic @Invoker(remap = false, value = "cc_onSetLevel") 14 | void invoke_cc_onSetLevel(long pos, int level); 15 | 16 | @Dynamic @Accessor(remap = false, value = "cc_existingCubesForCubeColumns") 17 | Long2ObjectMap get_cc_existingCubesForCubeColumns(); 18 | } 19 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/level/CubicDistanceManagerTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server.level; 2 | 3 | import io.github.opencubicchunks.cc_core.world.level.CloPos; 4 | import net.minecraft.server.level.DistanceManager; 5 | import net.minecraft.world.level.ChunkPos; 6 | import org.spongepowered.asm.mixin.Dynamic; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.gen.Accessor; 9 | import org.spongepowered.asm.mixin.gen.Invoker; 10 | 11 | @Mixin(DistanceManager.class) 12 | public interface CubicDistanceManagerTestAccess { 13 | @Invoker(value = "updateChunkForced") 14 | void invoke_updateChunkForced(ChunkPos pos, boolean add); 15 | 16 | @Dynamic 17 | @Invoker(value = "cc_updateCubeForced", remap = false) 18 | void invoke_updateCubeForced(CloPos pos, boolean add); 19 | 20 | @Accessor(value = "playerTicketManager") 21 | DistanceManager.PlayerTicketTracker get_playerTicketManager(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/level/MinecraftServerTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server.level; 2 | 3 | import net.minecraft.server.MinecraftServer; 4 | import net.minecraft.server.level.ServerLevel; 5 | import net.minecraft.server.level.progress.ChunkProgressListener; 6 | import net.minecraft.world.level.storage.ServerLevelData; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.gen.Invoker; 9 | 10 | @Mixin(MinecraftServer.class) 11 | public interface MinecraftServerTestAccess { 12 | 13 | @Invoker(value = "prepareLevels") 14 | void invoke_prepareLevels(ChunkProgressListener chunkProgressListener); 15 | 16 | @Invoker(value = "setInitialSpawn") 17 | void invoke_setInitialSpawn(ServerLevel serverLevel, ServerLevelData serverLevelData, boolean p_177899_, boolean p_177900_); 18 | } 19 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/level/ServerChunkCacheTestAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server.level; 2 | 3 | import net.minecraft.server.level.ServerChunkCache; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(ServerChunkCache.class) 8 | public interface ServerChunkCacheTestAccess { 9 | @Accessor 10 | ServerChunkCache.MainThreadExecutor getMainThreadProcessor(); 11 | } 12 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.test.common.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/LongRunTest.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.ElementType.TYPE; 5 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 6 | 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.Target; 9 | 10 | import org.junit.jupiter.api.Tag; 11 | 12 | @Target({ TYPE, METHOD }) 13 | @Retention(RUNTIME) 14 | @Tag("longRunTest") 15 | public @interface LongRunTest { 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/client/multiplayer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.client.multiplayer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/client/renderer/cube/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.client.renderer.cube; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/misc/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.misc; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/network/TestCCClientboundLevelChunkPacket.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.network; 2 | 3 | import static io.github.opencubicchunks.cubicchunks.testutils.Misc.assertDeepEquals; 4 | 5 | import io.github.opencubicchunks.cubicchunks.network.CCClientboundLevelChunkPacket; 6 | import io.github.opencubicchunks.cubicchunks.testutils.BaseTest; 7 | import io.netty.buffer.Unpooled; 8 | import net.minecraft.network.FriendlyByteBuf; 9 | import net.minecraft.world.level.ChunkPos; 10 | import org.junit.jupiter.api.Test; 11 | 12 | public class TestCCClientboundLevelChunkPacket extends BaseTest { 13 | 14 | @Test 15 | public void serdeTest() { 16 | var packet = new CCClientboundLevelChunkPacket(new ChunkPos(2, 4)); 17 | var buf = new FriendlyByteBuf(Unpooled.buffer()); 18 | packet.write(buf); 19 | assertDeepEquals(new CCClientboundLevelChunkPacket(buf), packet); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/network/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.network; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/TestCloHolder.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.integrationtest.server.level.IntegrationTestCubicChunkMap; 4 | import net.minecraft.server.level.ChunkHolder; 5 | import net.minecraft.server.level.ChunkMap; 6 | import net.minecraft.server.level.ServerChunkCache; 7 | 8 | /** 9 | * We do not unit test {@link ChunkHolder} as it is very tightly coupled with {@link ChunkMap} and {@link ServerChunkCache}. 10 | * 11 | * @see IntegrationTestCubicChunkMap integration tests 12 | */ 13 | public class TestCloHolder { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/TestCloTaskPriorityQueueSorter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.testutils.BaseTest; 4 | import org.junit.jupiter.api.Disabled; 5 | import org.junit.jupiter.api.Test; 6 | import org.junit.jupiter.api.TestInstance; 7 | 8 | /** 9 | * Tests for {@link io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level.MixinChunkTaskPriorityQueueSorter}. 10 | */ 11 | @TestInstance(TestInstance.Lifecycle.PER_CLASS) 12 | public class TestCloTaskPriorityQueueSorter extends BaseTest { 13 | @Disabled("This test is empty, since it is a mixin that is only affecting a debug method. We could test in the future if needed.") 14 | @Test public void testGetDebugStatus() {} 15 | } -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/TestCubicChunkMap.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.integrationtest.server.level.IntegrationTestCubicChunkMap; 4 | import net.minecraft.server.level.ChunkHolder; 5 | import net.minecraft.server.level.ChunkMap; 6 | import net.minecraft.server.level.ServerChunkCache; 7 | 8 | /** 9 | * We do not unit test {@link ChunkMap} as it is very tightly coupled with {@link ChunkHolder} and {@link ServerChunkCache}. 10 | * 11 | * @see IntegrationTestCubicChunkMap integration tests 12 | */ 13 | public class TestCubicChunkMap { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/TestCubicClientLevel.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.testutils.BaseTest; 4 | import org.junit.jupiter.api.TestInstance; 5 | 6 | 7 | /** 8 | * This test class is for testing {@link io.github.opencubicchunks.cubicchunks.mixin.core.common.client.multiplayer.MixinClientLevel} 9 | */ 10 | @TestInstance(TestInstance.Lifecycle.PER_CLASS) 11 | public class TestCubicClientLevel extends BaseTest { 12 | } 13 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/TestPlayerRespawnLogic.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.testutils.BaseTest; 4 | import org.junit.jupiter.api.TestInstance; 5 | 6 | /** 7 | * This test class is for testing {@link io.github.opencubicchunks.cubicchunks.mixin.core.common.server.level.MixinPlayerRespawnLogic}. 8 | */ 9 | @TestInstance(TestInstance.Lifecycle.PER_CLASS) 10 | public class TestPlayerRespawnLogic extends BaseTest { 11 | // TODO: There are no tests here because the only way to test this is with integration tests. 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/TestServerCubeCache.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.test.server.level; 2 | 3 | import io.github.opencubicchunks.cubicchunks.integrationtest.server.level.IntegrationTestServerCubeCache; 4 | import net.minecraft.server.level.ChunkHolder; 5 | import net.minecraft.server.level.ChunkMap; 6 | import net.minecraft.server.level.ServerChunkCache; 7 | 8 | /** 9 | * We do not unit test {@link ServerChunkCache} as it is very tightly coupled with {@link ChunkMap} and {@link ChunkHolder}. 10 | * 11 | * @see IntegrationTestServerCubeCache integration tests 12 | */ 13 | public class TestServerCubeCache { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.server.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/world/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.world.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/world/level/chunklike/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.world.level.chunklike; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/world/level/cube/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.world.level.cube; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/test/world/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.test.world.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/java/io/github/opencubicchunks/cubicchunks/testutils/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.testutils; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/test/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "cubicchunks", 4 | "name": "CubicChunks test", 5 | "description": "NeoForge currently does not support JUnit; we use this dummy mod file to apply mixins when running JUnit tests through fabric loader.", 6 | "version": "1.0.0", 7 | "mixins": [ 8 | { 9 | "config": "cubicchunks.mixins.core.json", 10 | "environment": "*" 11 | }, 12 | { 13 | "config": "cubicchunks.mixins.access.json", 14 | "environment": "*" 15 | }, 16 | { 17 | "config": "cubicchunks.mixins.test.json", 18 | "environment": "*" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /src_old/debug/resources/shaders/compile.bat: -------------------------------------------------------------------------------- 1 | G:/Comptuer/VulkanSDK/1.2.141.2/Bin32/glslc.exe -fshader-stage=vert vertex.glsl -o vert.spv 2 | G:/Comptuer/VulkanSDK/1.2.141.2/Bin32/glslc.exe -fshader-stage=frag fragment.glsl -o frag.spv 3 | pause -------------------------------------------------------------------------------- /src_old/debug/resources/shaders/frag.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks3/c01634c41dd9741cd589f5a0d14858f610b81e2a/src_old/debug/resources/shaders/frag.spv -------------------------------------------------------------------------------- /src_old/debug/resources/shaders/fragment.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec4 fragColor; 5 | 6 | layout(location = 0) out vec4 outColor; 7 | 8 | void main() { 9 | outColor = fragColor; 10 | } -------------------------------------------------------------------------------- /src_old/debug/resources/shaders/vert.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks3/c01634c41dd9741cd589f5a0d14858f610b81e2a/src_old/debug/resources/shaders/vert.spv -------------------------------------------------------------------------------- /src_old/debug/resources/shaders/vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(binding = 0) uniform UniformBufferObject { 5 | mat4 mvp; 6 | } ubo; 7 | 8 | layout(location = 0) in vec3 inPosition; 9 | layout(location = 1) in vec4 inColor; 10 | 11 | layout(location = 0) out vec4 fragColor; 12 | 13 | void main() { 14 | gl_Position = ubo.mvp * vec4(inPosition, 1.0); 15 | fragColor = inColor; 16 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/chunk/VerticalViewDistanceListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.chunk; 2 | 3 | public interface VerticalViewDistanceListener { 4 | 5 | void setIncomingVerticalViewDistance(int verticalDistance); 6 | 7 | int getVerticalViewDistance(); 8 | } 9 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/chunk/entity/ChunkEntityStateEventHandler.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.chunk.entity; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | 5 | public interface ChunkEntityStateEventHandler { 6 | void onCubeEntitiesLoad(CubePos pos); 7 | 8 | void onCubeEntitiesUnload(CubePos pos); 9 | } 10 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/chunk/entity/ChunkEntityStateEventSource.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.chunk.entity; 2 | 3 | public interface ChunkEntityStateEventSource { 4 | void registerChunkEntityStateEventHandler(ChunkEntityStateEventHandler handler); 5 | } 6 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/chunk/entity/IsCubicEntityContext.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.chunk.entity; 2 | 3 | public interface IsCubicEntityContext { 4 | 5 | boolean isCubic(); 6 | 7 | void setIsCubic(boolean isCubic); 8 | } 9 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/chunk/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.chunk.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/client/gui/screens/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.client.gui.screens; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/client/multiplayer/ClientCubeCache.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.multiplayer; 2 | 3 | import java.util.function.BiConsumer; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeSource; 7 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LevelCube; 8 | import net.minecraft.nbt.CompoundTag; 9 | import net.minecraft.network.FriendlyByteBuf; 10 | import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; 11 | 12 | public interface ClientCubeCache extends CubeSource { 13 | 14 | void drop(int x, int y, int z); 15 | 16 | void updateViewCenter(int x, int y, int z); 17 | 18 | void updateCubeViewRadius(int hDistance, int vDistance); 19 | 20 | LevelCube replaceWithPacketData(int cubeX, int cubeY, int cubeZ, FriendlyByteBuf readBuffer, CompoundTag tag, 21 | BiConsumer blockEntityTagOutputConsumer); 22 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/client/multiplayer/CubicClientLevel.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.client.multiplayer; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LevelCube; 4 | 5 | public interface CubicClientLevel { 6 | 7 | void onCubeLoaded(int cubeX, int cubeY, int cubeZ); 8 | 9 | void unload(LevelCube cube); 10 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/client/multiplayer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.client.multiplayer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/client/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.client; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/config/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.config; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/debug/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.debug; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/CubeWorldGenRandom.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.levelgen; 2 | 3 | import io.github.opencubicchunks.cubicchunks.levelgen.util.NonAtomicWorldgenRandom; 4 | 5 | public class CubeWorldGenRandom extends NonAtomicWorldgenRandom { 6 | public long setDecorationSeed(long worldSeed, int x, int y, int z) { 7 | this.setSeed(worldSeed); 8 | long sX = this.nextLong() | 1L; 9 | long sY = this.nextLong() | 1L; 10 | long sZ = this.nextLong() | 1L; 11 | long result = (long) x * sX + (long) y * sY + (long) z * sZ ^ worldSeed; 12 | this.setSeed(result); 13 | return result; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/CubicNoiseBasedChunkGenerator.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.levelgen; 2 | 3 | public interface CubicNoiseBasedChunkGenerator { 4 | void setCubic(); 5 | } 6 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/aquifer/AquiferRandom.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.levelgen.aquifer; 2 | 3 | import io.github.opencubicchunks.cubicchunks.levelgen.util.NonAtomicWorldgenRandom; 4 | 5 | public final class AquiferRandom extends NonAtomicWorldgenRandom { 6 | @Override 7 | public int nextInt(int bound) { 8 | // simplify method for aquifer's case to encourage inlining 9 | // namely, we remove the check for power of two bounds 10 | 11 | int bits; 12 | int result; 13 | int mod = bound - 1; 14 | 15 | do { 16 | long nextSeed = (this.seed * MULTIPLIER + ADDEND) & MASK; 17 | this.seed = nextSeed; 18 | bits = (int) (nextSeed >>> (48 - 31)); 19 | 20 | result = bits % bound; 21 | } while (bits + mod < result); 22 | 23 | return result; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/aquifer/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.aquifer; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/biome/BiomeGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.levelgen.biome; 2 | 3 | import io.github.opencubicchunks.cubicchunks.levelgen.CubeWorldGenRandom; 4 | import io.github.opencubicchunks.cubicchunks.levelgen.CubeWorldGenRegion; 5 | import net.minecraft.core.BlockPos; 6 | import net.minecraft.world.level.StructureFeatureManager; 7 | import net.minecraft.world.level.chunk.ChunkGenerator; 8 | 9 | public interface BiomeGetter { 10 | 11 | void generate(StructureFeatureManager structureManager, ChunkGenerator chunkGenerator, CubeWorldGenRegion region, long seed, CubeWorldGenRandom random, BlockPos blockPos); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/biome/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.biome; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/carver/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.carver; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/chunk/CubeGenerator.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.levelgen.chunk; 2 | 3 | import io.github.opencubicchunks.cubicchunks.levelgen.CubeWorldGenRegion; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.ProtoCube; 5 | import net.minecraft.world.level.StructureFeatureManager; 6 | 7 | public interface CubeGenerator { 8 | default void decorate(CubeWorldGenRegion region, StructureFeatureManager structureManager, ProtoCube cube) { 9 | } 10 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/feature/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.feature; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/placement/CubicHeightProvider.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.levelgen.placement; 2 | 3 | import java.util.OptionalInt; 4 | import java.util.Random; 5 | 6 | import net.minecraft.world.level.levelgen.WorldGenerationContext; 7 | 8 | public interface CubicHeightProvider { 9 | 10 | OptionalInt sampleCubic(Random random, WorldGenerationContext context, int minY, int maxY); 11 | } 12 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/placement/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.placement; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/levelgen/util/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.util; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/CCMixinConnector.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin; 2 | 3 | import org.spongepowered.asm.mixin.connect.IMixinConnector; 4 | import org.spongepowered.asm.mixin.injection.InjectionPoint; 5 | 6 | // TODO: no mixin connector 7 | public class CCMixinConnector implements IMixinConnector { 8 | 9 | @Override public void connect() { 10 | InjectionPoint.register(BeforeInstanceofInjectionPoint.class); 11 | } 12 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/ClassDuplicator.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin; 2 | 3 | import io.github.opencubicchunks.cubicchunks.server.level.CubeTaskPriorityQueue; 4 | import io.github.opencubicchunks.cubicchunks.server.level.CubeTaskPriorityQueueSorter; 5 | import net.minecraft.server.level.ChunkTaskPriorityQueue; 6 | import net.minecraft.server.level.ChunkTaskPriorityQueueSorter; 7 | 8 | public class ClassDuplicator { 9 | public static void init() { 10 | // ensures class loading order for the classes to transform correctly 11 | ChunkTaskPriorityQueue.class.getName(); 12 | CubeTaskPriorityQueue.class.getName(); 13 | 14 | ChunkTaskPriorityQueueSorter.class.getName(); 15 | CubeTaskPriorityQueueSorter.class.getName(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/ChunkRenderDispatcherAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 2 | 3 | import net.minecraft.client.multiplayer.ClientLevel; 4 | import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(ChunkRenderDispatcher.class) 9 | public interface ChunkRenderDispatcherAccess { 10 | @Accessor ClientLevel getLevel(); 11 | } 12 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/ClientChunkCacheStorageAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 2 | 3 | import java.util.concurrent.atomic.AtomicReferenceArray; 4 | 5 | import net.minecraft.client.multiplayer.ClientChunkCache; 6 | import net.minecraft.world.level.chunk.LevelChunk; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.gen.Accessor; 9 | import org.spongepowered.asm.mixin.gen.Invoker; 10 | 11 | @Mixin(ClientChunkCache.Storage.class) 12 | public interface ClientChunkCacheStorageAccess { 13 | 14 | @Invoker boolean invokeInRange(int x, int z); 15 | @Invoker int invokeGetIndex(int x, int z); 16 | @Accessor AtomicReferenceArray getChunks(); 17 | @Invoker void invokeReplace(int columnIdx, LevelChunk chunk); 18 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/OptionAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 2 | 3 | import net.minecraft.client.Option; 4 | import net.minecraft.network.chat.Component; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Invoker; 7 | 8 | @Mixin(Option.class) 9 | public interface OptionAccess { 10 | 11 | @Invoker Component invokeGenericValueLabel(Component value); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/ViewAreaAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 2 | 3 | import net.minecraft.client.renderer.ViewArea; 4 | import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher; 5 | import net.minecraft.core.BlockPos; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | 9 | @Mixin(ViewArea.class) 10 | public interface ViewAreaAccess { 11 | 12 | @Invoker ChunkRenderDispatcher.RenderChunk invokeGetRenderChunkAt(BlockPos pos); 13 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/client/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.access.client; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/BiomeGenerationSettingsAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.List; 4 | 5 | import net.minecraft.core.HolderSet; 6 | import net.minecraft.world.level.biome.BiomeGenerationSettings; 7 | import net.minecraft.world.level.levelgen.placement.PlacedFeature; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Mutable; 10 | import org.spongepowered.asm.mixin.gen.Accessor; 11 | 12 | @Mixin(BiomeGenerationSettings.class) 13 | public interface BiomeGenerationSettingsAccess { 14 | 15 | @Accessor 16 | List> getFeatures(); 17 | 18 | @Mutable @Accessor 19 | void setFeatures(List> features); 20 | } 21 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/BiomeManagerAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.biome.BiomeManager; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(BiomeManager.class) 8 | public interface BiomeManagerAccess { 9 | 10 | @Accessor("CHUNK_CENTER_QUART") static int getChunkCenterQuart() { 11 | throw new Error("Mixin did not apply"); 12 | } 13 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ChunkHolderAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | import java.util.concurrent.Executor; 5 | 6 | import com.mojang.datafixers.util.Either; 7 | import net.minecraft.server.level.ChunkHolder; 8 | import net.minecraft.server.level.ChunkMap; 9 | import net.minecraft.world.level.chunk.LevelChunk; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.gen.Accessor; 12 | import org.spongepowered.asm.mixin.gen.Invoker; 13 | 14 | @Mixin(ChunkHolder.class) 15 | public interface ChunkHolderAccess { 16 | @Accessor("UNLOADED_LEVEL_CHUNK_FUTURE") static CompletableFuture> getUnloadedLevelChunkFuture() { 17 | throw new Error("Mixin failed to apply"); 18 | } 19 | 20 | @Invoker void invokeUpdateFutures(ChunkMap chunkManagerIn, Executor exec); 21 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ChunkMapAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; 6 | import net.minecraft.server.level.ChunkHolder; 7 | import net.minecraft.server.level.ChunkMap; 8 | import net.minecraft.server.level.ServerLevel; 9 | import net.minecraft.world.level.ChunkPos; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.gen.Accessor; 12 | import org.spongepowered.asm.mixin.gen.Invoker; 13 | 14 | @Mixin(ChunkMap.class) 15 | public interface ChunkMapAccess { 16 | 17 | @Accessor ServerLevel getLevel(); 18 | 19 | @Invoker @Nullable ChunkHolder invokeGetUpdatingChunkIfPresent(long chunkPosIn); 20 | @Invoker boolean invokePromoteChunkMap(); 21 | @Invoker void invokeOnFullChunkStatusChange(ChunkPos chunkPos, ChunkHolder.FullChunkStatus fullChunkStatus); 22 | @Accessor int getViewDistance(); 23 | 24 | @Invoker void invokeReleaseLightTicket(ChunkPos pos); 25 | @Accessor Long2ObjectLinkedOpenHashMap getVisibleChunkMap(); 26 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ChunkMapTrackedEntityAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.ChunkMap; 4 | import net.minecraft.world.entity.Entity; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(ChunkMap.TrackedEntity.class) 9 | public interface ChunkMapTrackedEntityAccess { 10 | @Accessor Entity getEntity(); 11 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ChunkTicketTrackerFactoryAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.DistanceManager; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Invoker; 6 | 7 | @Mixin(DistanceManager.ChunkTicketTracker.class) 8 | public interface ChunkTicketTrackerFactoryAccess { 9 | 10 | @Invoker("") 11 | static DistanceManager.ChunkTicketTracker construct(DistanceManager ticketManager) { 12 | throw new Error("Mixin did not apply."); 13 | } 14 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/DynamicGraphMinFixedPointAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Invoker; 6 | 7 | @Mixin(DynamicGraphMinFixedPoint.class) 8 | public interface DynamicGraphMinFixedPointAccess { 9 | @Invoker void invokeCheckEdge(long fromPos, long toPos, int newLevel, boolean isDecreasing); 10 | @Invoker int invokeComputeLevelFromNeighbor(long startPos, long endPos, int startLevel); 11 | @Invoker int invokeGetLevel(long sectionPosIn); 12 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/FixedPlayerDistanceChunkTrackerFactoryAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.DistanceManager; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Invoker; 6 | 7 | @Mixin(DistanceManager.FixedPlayerDistanceChunkTracker.class) 8 | public interface FixedPlayerDistanceChunkTrackerFactoryAccess { 9 | 10 | @Invoker("") 11 | static DistanceManager.FixedPlayerDistanceChunkTracker construct(DistanceManager ticketManager, int i) { 12 | throw new Error("Mixin did not apply."); 13 | } 14 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/HeightmapAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.function.Predicate; 4 | 5 | import net.minecraft.util.BitStorage; 6 | import net.minecraft.world.level.block.state.BlockState; 7 | import net.minecraft.world.level.chunk.ChunkAccess; 8 | import net.minecraft.world.level.levelgen.Heightmap; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Mutable; 11 | import org.spongepowered.asm.mixin.gen.Accessor; 12 | import org.spongepowered.asm.mixin.gen.Invoker; 13 | 14 | @Mixin(Heightmap.class) 15 | public interface HeightmapAccess { 16 | @Mutable @Accessor void setData(BitStorage value); 17 | @Mutable @Accessor void setIsOpaque(Predicate value); 18 | @Mutable @Accessor void setChunk(ChunkAccess value); 19 | 20 | @Accessor BitStorage getData(); 21 | @Accessor Predicate getIsOpaque(); 22 | @Accessor ChunkAccess getChunk(); 23 | 24 | @Invoker void invokeSetHeight(int x, int z, int newY); 25 | } 26 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/IOWorkerAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | 5 | import net.minecraft.nbt.CompoundTag; 6 | import net.minecraft.world.level.ChunkPos; 7 | import net.minecraft.world.level.chunk.storage.IOWorker; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.gen.Invoker; 10 | 11 | @Mixin(IOWorker.class) 12 | public interface IOWorkerAccess { 13 | 14 | @Invoker 15 | CompletableFuture invokeLoadAsync(ChunkPos pos); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/LayerLightSectionStorageAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.chunk.LightChunkGetter; 4 | import net.minecraft.world.level.lighting.LayerLightSectionStorage; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | 9 | @Mixin(LayerLightSectionStorage.class) 10 | public interface LayerLightSectionStorageAccess { 11 | 12 | @Invoker("enableLightSources") void invokeSetColumnEnabled(long seed, boolean enable); 13 | 14 | @Invoker boolean invokeStoringLightForSection(long sectionPos); 15 | 16 | @Invoker void invokeRunAllUpdates(); 17 | 18 | @Accessor LightChunkGetter getChunkSource(); 19 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/LevelChunkSectionAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.block.state.BlockState; 4 | import net.minecraft.world.level.chunk.LevelChunkSection; 5 | import net.minecraft.world.level.chunk.PalettedContainer; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Mutable; 8 | import org.spongepowered.asm.mixin.gen.Accessor; 9 | 10 | @Mixin(LevelChunkSection.class) 11 | public interface LevelChunkSectionAccess { 12 | @Accessor short getNonEmptyBlockCount(); 13 | @Accessor short getTickingBlockCount(); 14 | @Accessor short getTickingFluidCount(); 15 | 16 | @Mutable @Accessor void setStates(PalettedContainer states); 17 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/LevelStorageAccessAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.nio.file.Path; 4 | 5 | import net.minecraft.world.level.storage.LevelStorageSource; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.gen.Accessor; 8 | 9 | @Mixin(LevelStorageSource.LevelStorageAccess.class) 10 | public interface LevelStorageAccessAccess { 11 | @Accessor Path getLevelPath(); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/LevelTicksAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.function.BiConsumer; 4 | 5 | import it.unimi.dsi.fastutil.longs.Long2LongMap; 6 | import it.unimi.dsi.fastutil.longs.Long2ObjectMap; 7 | import net.minecraft.world.ticks.LevelChunkTicks; 8 | import net.minecraft.world.ticks.LevelTicks; 9 | import net.minecraft.world.ticks.ScheduledTick; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.gen.Accessor; 12 | 13 | @Mixin(LevelTicks.class) 14 | public interface LevelTicksAccess { 15 | @Accessor 16 | Long2ObjectMap> getAllContainers(); 17 | 18 | @Accessor 19 | Long2LongMap getNextTickForContainer(); 20 | 21 | @Accessor 22 | BiConsumer, ScheduledTick> getChunkScheduleUpdater(); 23 | } 24 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/Matrix4fAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import com.mojang.math.Matrix4f; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(Matrix4f.class) 8 | public interface Matrix4fAccess { 9 | 10 | @Accessor("m00") void setM00(float val); 11 | @Accessor("m01") void setM01(float val); 12 | @Accessor("m02") void setM02(float val); 13 | @Accessor("m03") void setM03(float val); 14 | @Accessor("m10") void setM10(float val); 15 | @Accessor("m11") void setM11(float val); 16 | @Accessor("m12") void setM12(float val); 17 | @Accessor("m13") void setM13(float val); 18 | @Accessor("m20") void setM20(float val); 19 | @Accessor("m21") void setM21(float val); 20 | @Accessor("m22") void setM22(float val); 21 | @Accessor("m23") void setM23(float val); 22 | @Accessor("m30") void setM30(float val); 23 | @Accessor("m31") void setM31(float val); 24 | @Accessor("m32") void setM32(float val); 25 | @Accessor("m33") void setM33(float val); 26 | } 27 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/NaturalSpawnerAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.NaturalSpawner; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(NaturalSpawner.class) 8 | public interface NaturalSpawnerAccess { 9 | 10 | @Accessor("MAGIC_NUMBER") static int getMagicNumber() { 11 | throw new Error("Mixin did not apply"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/NoiseChunkAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.Map; 4 | 5 | import net.minecraft.world.level.levelgen.DensityFunction; 6 | import net.minecraft.world.level.levelgen.NoiseChunk; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Mutable; 9 | import org.spongepowered.asm.mixin.gen.Accessor; 10 | 11 | @Mixin(NoiseChunk.class) 12 | public interface NoiseChunkAccess { 13 | @Mutable 14 | @Accessor("wrapped") 15 | void setWrapped(Map map); 16 | 17 | @Accessor 18 | Map getWrapped(); 19 | } 20 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/NoiseGeneratorSettingsAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.levelgen.NoiseGeneratorSettings; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(NoiseGeneratorSettings.class) 8 | public interface NoiseGeneratorSettingsAccess { 9 | 10 | @Accessor("disableMobGeneration") 11 | boolean isDisableMobGeneration(); 12 | 13 | @Accessor("aquifersEnabled") 14 | boolean isAquifersEnabled(); 15 | } 16 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/PlayerTicketTrackerFactoryAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.DistanceManager; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Invoker; 6 | 7 | @Mixin(DistanceManager.PlayerTicketTracker.class) 8 | public interface PlayerTicketTrackerFactoryAccess { 9 | 10 | @Invoker("") 11 | static DistanceManager.PlayerTicketTracker construct(DistanceManager ticketManager, int i) { 12 | throw new Error("Mixin did not apply."); 13 | } 14 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/PoiSectionAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.entity.ai.village.poi.PoiSection; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Invoker; 6 | 7 | @Mixin(PoiSection.class) 8 | public interface PoiSectionAccess { 9 | 10 | @Invoker 11 | boolean invokeIsValid(); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ProtoChunkTicksAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.ticks.ProtoChunkTicks; 4 | import net.minecraft.world.ticks.SavedTick; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Invoker; 7 | 8 | @Mixin(ProtoChunkTicks.class) 9 | public interface ProtoChunkTicksAccess { 10 | @Invoker 11 | void callSchedule(SavedTick tick); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/SavedTickAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.ticks.SavedTick; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(SavedTick.class) 8 | public interface SavedTickAccess { 9 | @Accessor 10 | static String getTAG_ID() { 11 | throw new Error("Mixin not applied!"); 12 | } 13 | 14 | @Accessor 15 | static String getTAG_X() { 16 | throw new Error("Mixin not applied!"); 17 | } 18 | 19 | @Accessor 20 | static String getTAG_Y() { 21 | throw new Error("Mixin not applied!"); 22 | } 23 | 24 | @Accessor 25 | static String getTAG_Z() { 26 | throw new Error("Mixin not applied!"); 27 | } 28 | 29 | @Accessor 30 | static String getTAG_DELAY() { 31 | throw new Error("Mixin not applied!"); 32 | } 33 | 34 | @Accessor 35 | static String getTAG_PRIORITY() { 36 | throw new Error("Mixin not applied!"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/SortedArraySetAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.util.SortedArraySet; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | import org.spongepowered.asm.mixin.gen.Invoker; 7 | 8 | @Mixin(SortedArraySet.class) 9 | public interface SortedArraySetAccess { 10 | @Accessor 11 | T[] getContents(); 12 | 13 | @Invoker 14 | void invokeRemoveInternal(int idx); 15 | } 16 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/SpawnStateAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; 4 | import net.minecraft.world.entity.MobCategory; 5 | import net.minecraft.world.level.LocalMobCapCalculator; 6 | import net.minecraft.world.level.NaturalSpawner; 7 | import net.minecraft.world.level.PotentialCalculator; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.gen.Invoker; 10 | 11 | @Mixin(NaturalSpawner.SpawnState.class) 12 | public interface SpawnStateAccess { 13 | 14 | @Invoker("") static NaturalSpawner.SpawnState createNew(int i, Object2IntOpenHashMap object2IntOpenHashMap, PotentialCalculator potentialCalculator, 15 | LocalMobCapCalculator mobCapCalculator) { 16 | throw new Error("Mixin did not apply"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/StructureFeatureManagerAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.world.level.StructureFeatureManager; 4 | import net.minecraft.world.level.levelgen.WorldGenSettings; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(StructureFeatureManager.class) 9 | public interface StructureFeatureManagerAccess { 10 | 11 | @Accessor WorldGenSettings getWorldGenSettings(); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/ThreadedLevelLightEngineAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.ChunkMap; 4 | import net.minecraft.server.level.ThreadedLevelLightEngine; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | 9 | @Mixin(ThreadedLevelLightEngine.class) 10 | public interface ThreadedLevelLightEngineAccess { 11 | @Accessor ChunkMap getChunkMap(); 12 | 13 | @Invoker void invokeAddTask(int x, int z, ThreadedLevelLightEngine.TaskType stage, Runnable task); 14 | } 15 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/TicketAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import net.minecraft.server.level.Ticket; 4 | import net.minecraft.server.level.TicketType; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | 9 | @Mixin(Ticket.class) 10 | public interface TicketAccess { 11 | @Invoker("") static Ticket createNew(TicketType ticketType, int i, T object) { 12 | throw new Error("Mixin did not apply"); 13 | } 14 | @Invoker boolean invokeTimedOut(long currentTime); 15 | @Invoker void invokeSetCreatedTick(long time); 16 | 17 | @Accessor T getKey(); 18 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/TicketTypeAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.Comparator; 4 | 5 | import net.minecraft.server.level.TicketType; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | 9 | @Mixin(TicketType.class) 10 | public interface TicketTypeAccess { 11 | @Invoker("") static TicketType createNew(String string, Comparator comparator, long l) { 12 | throw new Error("Mixin did not apply"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/WorldGenRegionAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 2 | 3 | import java.util.function.Supplier; 4 | 5 | import javax.annotation.Nullable; 6 | 7 | import net.minecraft.server.level.WorldGenRegion; 8 | import net.minecraft.world.level.chunk.ChunkStatus; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.gen.Accessor; 11 | 12 | @Mixin(WorldGenRegion.class) 13 | public interface WorldGenRegionAccess { 14 | 15 | @Accessor 16 | int getWriteRadiusCutoff(); 17 | 18 | @Accessor 19 | ChunkStatus getGeneratingStatus(); 20 | 21 | @Nullable 22 | @Accessor 23 | Supplier getCurrentlyGenerating(); 24 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.access.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/access/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.access; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/asm/common/MixinAsmTarget.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.asm.common; 2 | 3 | import io.github.opencubicchunks.cubicchunks.server.level.CubeTaskPriorityQueue; 4 | import io.github.opencubicchunks.cubicchunks.server.level.CubeTaskPriorityQueueSorter; 5 | import net.minecraft.server.level.ChunkHolder; 6 | import net.minecraft.server.level.ChunkMap; 7 | import net.minecraft.server.level.ChunkTaskPriorityQueue; 8 | import net.minecraft.server.level.ChunkTaskPriorityQueueSorter; 9 | import net.minecraft.server.level.DistanceManager; 10 | import net.minecraft.world.level.NaturalSpawner; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | 13 | @Mixin({ 14 | ChunkMap.DistanceManager.class, 15 | ChunkMap.class, 16 | ChunkHolder.class, 17 | NaturalSpawner.class, 18 | DistanceManager.class, 19 | ChunkTaskPriorityQueue.class, 20 | CubeTaskPriorityQueue.class, 21 | ChunkTaskPriorityQueueSorter.class, 22 | CubeTaskPriorityQueueSorter.class 23 | }) 24 | public class MixinAsmTarget { 25 | // intentionally empty 26 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/asm/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.asm.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/asmfixes/common/level/NaturalSpawnerFixes.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.asmfixes.common.level; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeAccess; 5 | import net.minecraft.world.level.NaturalSpawner; 6 | import net.minecraft.world.level.chunk.ChunkAccess; 7 | import org.spongepowered.asm.mixin.Dynamic; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(NaturalSpawner.class) 13 | public class NaturalSpawnerFixes { 14 | @Dynamic @Redirect(method = "isRightDistanceToPlayerAndSpawnPointForCube", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/chunk/ChunkAccess;getCubePos()" 15 | + "Lio/github/opencubicchunks/cc_core/api/CubePos;")) 16 | private static CubePos getCubePosChunkToCube(ChunkAccess cube) { 17 | return ((CubeAccess) cube).getCubePos(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/asmfixes/common/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.asmfixes.common.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/asmfixes/common/ticket/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.asmfixes.common.ticket; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/asmfixes/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.asmfixes; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/debug/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.debug; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/entity/MixinTransientEntitySectionManager.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.entity; 2 | 3 | import io.github.opencubicchunks.cubicchunks.chunk.entity.IsCubicEntityContext; 4 | import net.minecraft.world.level.entity.EntityAccess; 5 | import net.minecraft.world.level.entity.EntitySectionStorage; 6 | import net.minecraft.world.level.entity.TransientEntitySectionManager; 7 | import org.spongepowered.asm.mixin.Final; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | 11 | @Mixin(TransientEntitySectionManager.class) 12 | public class MixinTransientEntitySectionManager implements IsCubicEntityContext { 13 | 14 | 15 | @Shadow @Final EntitySectionStorage sectionStorage; 16 | 17 | private boolean isCubic; 18 | 19 | @Override public boolean isCubic() { 20 | return this.isCubic; 21 | } 22 | 23 | @Override public void setIsCubic(boolean isCubic) { 24 | this.isCubic = isCubic; 25 | ((IsCubicEntityContext) this.sectionStorage).setIsCubic(isCubic); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/progress/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.progress; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/render/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.render; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/server/MixinIntegratedPlayerList.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.server; 2 | 3 | import io.github.opencubicchunks.cubicchunks.chunk.VerticalViewDistanceListener; 4 | import net.minecraft.client.server.IntegratedPlayerList; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Redirect; 8 | 9 | @Mixin(IntegratedPlayerList.class) 10 | public class MixinIntegratedPlayerList { 11 | @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/server/IntegratedPlayerList;setViewDistance(I)V")) 12 | private void setVerticalViewDistance(IntegratedPlayerList integratedPlayerList, int viewDistance) { 13 | ((VerticalViewDistanceListener) integratedPlayerList).setIncomingVerticalViewDistance(viewDistance); 14 | ((IntegratedPlayerList) (Object) this).setViewDistance(viewDistance); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/client/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.client.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/MixinBlockPos.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common; 2 | 3 | import net.minecraft.core.BlockPos; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.injection.Constant; 6 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 7 | 8 | @Mixin(BlockPos.class) 9 | public class MixinBlockPos { 10 | 11 | //TODO: This is a temporary fix to achieve taller worlds(by stopping the light engine from NPEing. Will be removed in the future. 12 | @ModifyConstant(method = "", constant = @Constant(intValue = 30000000)) 13 | private static int getMaxWorldSizeXZ(int size) { 14 | return 1000000; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/blockentity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.blockentity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/chunk/MixinChunkHolderLevelChangeListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.chunk; 2 | 3 | import java.util.function.IntConsumer; 4 | import java.util.function.IntSupplier; 5 | 6 | import io.github.opencubicchunks.cc_core.api.CubePos; 7 | import io.github.opencubicchunks.cubicchunks.server.level.CubeHolderLevelChangeListener; 8 | import net.minecraft.server.level.ChunkHolder; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | 11 | @Mixin(ChunkHolder.LevelChangeListener.class) 12 | public interface MixinChunkHolderLevelChangeListener extends CubeHolderLevelChangeListener { 13 | 14 | @Override default void onCubeLevelChange(CubePos pos, IntSupplier intSupplier, int i, IntConsumer consumer) { 15 | } 16 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/chunk/MixinImposterProtoChunk.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.chunk; 2 | 3 | import io.github.opencubicchunks.cc_core.world.ColumnCubeMap; 4 | import io.github.opencubicchunks.cc_core.world.ColumnCubeMapGetter; 5 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LightHeightmapGetter; 6 | import net.minecraft.world.level.chunk.ImposterProtoChunk; 7 | import net.minecraft.world.level.chunk.LevelChunk; 8 | import net.minecraft.world.level.levelgen.Heightmap; 9 | import org.spongepowered.asm.mixin.Final; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Shadow; 12 | 13 | @Mixin(ImposterProtoChunk.class) 14 | public class MixinImposterProtoChunk implements ColumnCubeMapGetter, LightHeightmapGetter { 15 | 16 | @Shadow @Final private LevelChunk wrapped; 17 | 18 | @Override public ColumnCubeMap getCubeMap() { 19 | return ((ColumnCubeMapGetter) this.wrapped).getCubeMap(); 20 | } 21 | 22 | @Override public Heightmap getLightHeightmap() { 23 | return ((LightHeightmapGetter) this.wrapped).getLightHeightmap(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/chunk/storage/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.chunk.storage; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/entity/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.entity; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/entity/storage/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.entity.storage; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/level/MixinChunkSource.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.level; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeAccess; 6 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeSource; 7 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LightCubeGetter; 8 | import net.minecraft.world.level.BlockGetter; 9 | import net.minecraft.world.level.chunk.ChunkSource; 10 | import net.minecraft.world.level.chunk.ChunkStatus; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | 13 | @Mixin(ChunkSource.class) 14 | public abstract class MixinChunkSource implements LightCubeGetter, CubeSource { 15 | 16 | @Override 17 | @Nullable 18 | public BlockGetter getCubeForLighting(int cubeX, int cubeY, int cubeZ) { 19 | return this.getCube(cubeX, cubeY, cubeZ, ChunkStatus.EMPTY, false); 20 | } 21 | 22 | @Override 23 | @Nullable 24 | public abstract CubeAccess getCube(int cubeX, int cubeY, int cubeZ, ChunkStatus requiredStatus, boolean load); 25 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/level/MixinLevelHeightAccessor.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.level; 2 | 3 | import io.github.opencubicchunks.cc_core.world.CubicLevelHeightAccessor; 4 | import net.minecraft.world.level.LevelHeightAccessor; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | 7 | @Mixin(LevelHeightAccessor.class) 8 | public interface MixinLevelHeightAccessor extends CubicLevelHeightAccessor { 9 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/level/lighting/MixinDynamicGraphMinFixedPoint.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.level.lighting; 2 | 3 | import net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.Shadow; 6 | 7 | @Mixin(DynamicGraphMinFixedPoint.class) 8 | public abstract class MixinDynamicGraphMinFixedPoint { 9 | @Shadow protected abstract void checkNeighbor(long sourceId, long targetId, int level, boolean decrease); 10 | 11 | @Shadow 12 | protected abstract void checkEdge(long sourceId, long id, int level, boolean decrease); 13 | } 14 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/level/lighting/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.level.lighting; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/network/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.network; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/progress/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.progress; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/common/ticket/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.common.ticket; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/server/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.server.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/core/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.core.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/debug/client/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.debug.client; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/debug/common/MixinPlayerRespawnLogic.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.debug.common; 2 | 3 | import net.minecraft.core.BlockPos; 4 | import net.minecraft.server.level.PlayerRespawnLogic; 5 | import net.minecraft.server.level.ServerLevel; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | @Mixin(value = PlayerRespawnLogic.class, priority = 999) 12 | public class MixinPlayerRespawnLogic { 13 | private static final boolean DEBUG_LOAD_ORDER_ENABLED = System.getProperty("cubicchunks.debug.loadorder", "false").equals("true"); 14 | 15 | @Inject(method = "getOverworldRespawnPos", at = @At("HEAD"), cancellable = true) 16 | private static void fakeRespawnLocation(ServerLevel serverLevel, int x, int z, CallbackInfoReturnable cir) { 17 | if (!DEBUG_LOAD_ORDER_ENABLED) { 18 | return; 19 | } 20 | cir.setReturnValue(new BlockPos(0, 0, 0)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/debug/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.debug.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/biome/MixinBiomeSource.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.biome; 2 | 3 | import io.github.opencubicchunks.cubicchunks.CubicChunks; 4 | import net.minecraft.world.level.biome.BiomeSource; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | @Mixin(BiomeSource.class) 11 | public class MixinBiomeSource { 12 | @Inject(method = "", at = @At("RETURN")) 13 | private static void registerCustom(CallbackInfo ci) { 14 | CubicChunks.registerBiomeSources(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/biome/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.biome; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/carver/MixinWorldCarver.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.carver; 2 | 3 | import io.github.opencubicchunks.cubicchunks.CubicChunks; 4 | import net.minecraft.world.level.levelgen.VerticalAnchor; 5 | import net.minecraft.world.level.levelgen.WorldGenerationContext; 6 | import net.minecraft.world.level.levelgen.carver.WorldCarver; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | @Mixin(WorldCarver.class) 12 | public class MixinWorldCarver { 13 | 14 | @Redirect(method = "getCarveState", 15 | at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/VerticalAnchor;resolveY(Lnet/minecraft/world/level/levelgen/WorldGenerationContext;)I")) 16 | private int returnMinIntValue(VerticalAnchor verticalAnchor, WorldGenerationContext context) { 17 | return CubicChunks.MIN_SUPPORTED_HEIGHT; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/carver/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.carver; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/MixinDesertWellFeature.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature; 2 | 3 | 4 | import io.github.opencubicchunks.cc_core.utils.Coords; 5 | import io.github.opencubicchunks.cc_core.world.CubicLevelHeightAccessor; 6 | import io.github.opencubicchunks.cubicchunks.levelgen.CubeWorldGenRegion; 7 | import net.minecraft.world.level.WorldGenLevel; 8 | import net.minecraft.world.level.levelgen.feature.DesertWellFeature; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | @Mixin(DesertWellFeature.class) 14 | public class MixinDesertWellFeature { 15 | 16 | @Redirect(method = "place", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/WorldGenLevel;getMinBuildHeight()I")) 17 | private int useBottomYMainCube(WorldGenLevel level) { 18 | if (!((CubicLevelHeightAccessor) level).isCubic()) { 19 | return level.getMinBuildHeight(); 20 | } 21 | return Coords.cubeToMinBlock(((CubeWorldGenRegion) level).getMainCubeY()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/MixinIcePatchFeature.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature; 2 | 3 | import io.github.opencubicchunks.cc_core.utils.Coords; 4 | import io.github.opencubicchunks.cc_core.world.CubicLevelHeightAccessor; 5 | import io.github.opencubicchunks.cubicchunks.levelgen.CubeWorldGenRegion; 6 | import net.minecraft.world.level.WorldGenLevel; 7 | import net.minecraft.world.level.levelgen.feature.IcePatchFeature; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(IcePatchFeature.class) 13 | public class MixinIcePatchFeature { 14 | 15 | @Redirect(method = "place", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/WorldGenLevel;getMinBuildHeight()I")) 16 | private int useBottomYMainCube(WorldGenLevel level) { 17 | if (!((CubicLevelHeightAccessor) level).isCubic()) { 18 | return level.getMinBuildHeight(); 19 | } 20 | return Coords.cubeToMinBlock(((CubeWorldGenRegion) level).getMainCubeY()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/MixinIceSpikeFeature.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature; 2 | 3 | import io.github.opencubicchunks.cc_core.utils.Coords; 4 | import io.github.opencubicchunks.cc_core.world.CubicLevelHeightAccessor; 5 | import io.github.opencubicchunks.cubicchunks.levelgen.CubeWorldGenRegion; 6 | import net.minecraft.world.level.WorldGenLevel; 7 | import net.minecraft.world.level.levelgen.feature.IceSpikeFeature; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(IceSpikeFeature.class) 13 | public class MixinIceSpikeFeature { 14 | 15 | @Redirect(method = "place", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/WorldGenLevel;getMinBuildHeight()I")) 16 | private int useBottomYMainCube(WorldGenLevel level) { 17 | if (!((CubicLevelHeightAccessor) level).isCubic()) { 18 | return level.getMinBuildHeight(); 19 | } 20 | return Coords.cubeToMinBlock(((CubeWorldGenRegion) level).getMainCubeY()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/MixinMiscOverworldFeatures.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature; 2 | 3 | import io.github.opencubicchunks.cubicchunks.levelgen.feature.CubicFeatures; 4 | import net.minecraft.data.worldgen.features.MiscOverworldFeatures; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | @Mixin(MiscOverworldFeatures.class) 11 | public class MixinMiscOverworldFeatures { 12 | @Inject(method = "", at = @At("RETURN")) 13 | private static void init(CallbackInfo ci) { 14 | CubicFeatures.init(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/nether/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature.nether; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/feature/range/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.feature.range; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/noise/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.noise; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/placement/MixinHeightProvider.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.placement; 2 | 3 | import java.util.OptionalInt; 4 | import java.util.Random; 5 | 6 | import io.github.opencubicchunks.cubicchunks.levelgen.placement.CubicHeightProvider; 7 | import net.minecraft.world.level.levelgen.WorldGenerationContext; 8 | import net.minecraft.world.level.levelgen.heightproviders.HeightProvider; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Shadow; 11 | 12 | @Mixin(HeightProvider.class) 13 | public abstract class MixinHeightProvider implements CubicHeightProvider { 14 | 15 | @Shadow public abstract int sample(Random random, WorldGenerationContext context); 16 | 17 | @Override public OptionalInt sampleCubic(Random random, WorldGenerationContext context, int minY, int maxY) { 18 | int sampledY = this.sample(random, context); 19 | if (sampledY <= maxY && sampledY >= minY) { 20 | return OptionalInt.of(sampledY); 21 | } 22 | return OptionalInt.empty(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/placement/MixinPlacementModifier.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.placement; 2 | 3 | import io.github.opencubicchunks.cubicchunks.CubicChunks; 4 | import net.minecraft.world.level.levelgen.placement.PlacementModifier; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | @Mixin(PlacementModifier.class) 11 | public class MixinPlacementModifier { 12 | @Inject(method = "", at = @At("RETURN")) 13 | private static void init(CallbackInfo ci) { 14 | CubicChunks.registerPlacementModifiers(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/placement/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.placement; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/placement/verticalanchor/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.placement.verticalanchor; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/structure/MixinStructureFeature.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.structure; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.ImposterChunkPos; 4 | import net.minecraft.nbt.CompoundTag; 5 | import net.minecraft.world.level.ChunkPos; 6 | import net.minecraft.world.level.levelgen.feature.StructureFeature; 7 | import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(StructureFeature.class) 13 | public abstract class MixinStructureFeature { 14 | @Redirect(method = "loadStaticStart", at = @At(value = "NEW", target = "net/minecraft/world/level/ChunkPos")) 15 | private static ChunkPos loadStaticCubeStart(int x, int z, StructurePieceSerializationContext context, CompoundTag nbt, long worldSeed) { 16 | ChunkPos original = new ChunkPos(x, z); 17 | return nbt.contains("ChunkY") ? new ImposterChunkPos(x, nbt.getInt("ChunkY"), z) : original; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/structure/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.structure; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/levelgen/common/structure/pieces/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.levelgen.common.structure.pieces; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/optifine/client/vanilla/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.optifine.client.vanilla; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/mixin/test/common/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mixin.test.common; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/network/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.network; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/optifine/IOptiFineChunkRender.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.optifine; 2 | 3 | import net.minecraft.world.level.chunk.LevelChunkSection; 4 | 5 | public interface IOptiFineChunkRender { 6 | LevelChunkSection getCube(); 7 | 8 | int getRegionX(); 9 | 10 | int getRegionY(); 11 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/optifine/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.optifine; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubeHolderLevelChangeListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import java.util.function.IntConsumer; 4 | import java.util.function.IntSupplier; 5 | 6 | import io.github.opencubicchunks.cc_core.api.CubePos; 7 | 8 | public interface CubeHolderLevelChangeListener { 9 | void onCubeLevelChange(CubePos pos, IntSupplier intSupplier, int i, IntConsumer consumer); 10 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubeHolderPlayerProvider.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import java.util.stream.Stream; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import net.minecraft.server.level.ServerPlayer; 7 | 8 | // TODO: move this to CubeMap, this interface is unnecessary 9 | public interface CubeHolderPlayerProvider { 10 | Stream getPlayers(CubePos cubePos, boolean onlyOnWatchDistanceEdge); 11 | } 12 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubeMapInternal.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | 5 | public interface CubeMapInternal { 6 | 7 | boolean isExistingCubeFull(CubePos pos); 8 | } 9 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/CubeTaskPriorityQueue.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | public class CubeTaskPriorityQueue { 4 | public static int LEVEL_COUNT = -1; 5 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/clo/CloTaskPriorityQueue.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | public class CloTaskPriorityQueue { 4 | public static int LEVEL_COUNT = -1; 5 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/clo/CubeHolderLevelChangeListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import java.util.function.IntConsumer; 4 | import java.util.function.IntSupplier; 5 | 6 | import io.github.opencubicchunks.cc_core.api.CubePos; 7 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.CloPos; 8 | 9 | public interface CubeHolderLevelChangeListener { 10 | void onCloLevelChange(CloPos pos, IntSupplier intSupplier, int i, IntConsumer consumer); 11 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/clo/CubeHolderPlayerProvider.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import java.util.stream.Stream; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.CloPos; 7 | import net.minecraft.server.level.ServerPlayer; 8 | 9 | // TODO: move this to CubeMap, this interface is unnecessary 10 | public interface CubeHolderPlayerProvider { 11 | Stream getPlayers(CloPos cloPos, boolean onlyOnWatchDistanceEdge); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/clo/CubeMapInternal.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunklike.CloPos; 5 | import net.minecraft.world.level.chunk.ChunkStatus; 6 | 7 | public interface CubeMapInternal { 8 | 9 | // methods added by ASM that we need to use directly 10 | boolean isExistingCloFull(CloPos pos); 11 | 12 | ChunkStatus getCubeDependencyStatus(ChunkStatus status, int distance); 13 | } 14 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.server.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/progress/CubeProgressListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level.progress; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import net.minecraft.server.level.progress.ChunkProgressListener; 7 | import net.minecraft.world.level.chunk.ChunkStatus; 8 | 9 | public interface CubeProgressListener extends ChunkProgressListener { 10 | void startCubes(CubePos center); 11 | 12 | void onCubeStatusChange(CubePos cubePos, @Nullable ChunkStatus newStatus); 13 | //Interface does not have a stopCubes(); because the equivalent stop for chunks does the same thing, and is called at the same time. 14 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/progress/StoringCubeProgressListener.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.server.level.progress; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import net.minecraft.world.level.chunk.ChunkStatus; 6 | 7 | public interface StoringCubeProgressListener { 8 | 9 | @Nullable ChunkStatus getStatus(int x, int y, int z); 10 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/level/progress/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.server.level.progress; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/utils/BufferUtils.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.utils; 2 | 3 | import net.minecraft.network.FriendlyByteBuf; 4 | 5 | public class BufferUtils { 6 | public static void writeSignedVarInt(FriendlyByteBuf buf, int value) { 7 | buf.writeVarInt(value >= 0 ? value << 1 | 1 : ~value << 1); 8 | } 9 | 10 | public static int readSignedVarInt(FriendlyByteBuf buf) { 11 | int val = buf.readVarInt(); 12 | return (val & 1) == 0 ? ~(val >>> 1) : val >>> 1; 13 | } 14 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/utils/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.utils; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/CubicChunksSavedData.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world; 2 | 3 | import io.github.opencubicchunks.cc_core.world.CubicLevelHeightAccessor; 4 | import io.github.opencubicchunks.cubicchunks.CubicChunks; 5 | import net.minecraft.nbt.CompoundTag; 6 | import net.minecraft.world.level.saveddata.SavedData; 7 | 8 | public class CubicChunksSavedData extends SavedData { 9 | public static final String FILE_ID = CubicChunks.MODID; 10 | 11 | public final CubicLevelHeightAccessor.WorldStyle worldStyle; 12 | 13 | public CubicChunksSavedData(CubicLevelHeightAccessor.WorldStyle worldStyle) { 14 | this.worldStyle = worldStyle; 15 | } 16 | 17 | public static CubicChunksSavedData load(CompoundTag tag) { 18 | return new CubicChunksSavedData(CubicLevelHeightAccessor.WorldStyle.valueOf(tag.getString("worldStyle"))); 19 | } 20 | 21 | @Override 22 | public CompoundTag save(CompoundTag tag) { 23 | tag.putString("worldStyle", this.worldStyle.name()); 24 | return tag; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/CubicLocalMobCapCalculator.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import net.minecraft.world.entity.MobCategory; 5 | 6 | public interface CubicLocalMobCapCalculator { 7 | void addMob(CubePos cube, MobCategory category); 8 | 9 | boolean canSpawn(MobCategory category, CubePos cube); 10 | 11 | boolean isCubic(); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/CubicServerTickList.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world; 2 | 3 | public interface CubicServerTickList { 4 | //ListTag save(CubePos cubePos); 5 | } 6 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/DummyHeightmap.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world; 2 | 3 | import net.minecraft.world.level.block.state.BlockState; 4 | import net.minecraft.world.level.chunk.ChunkAccess; 5 | import net.minecraft.world.level.levelgen.Heightmap; 6 | 7 | public class DummyHeightmap extends Heightmap { 8 | public DummyHeightmap(ChunkAccess chunkAccess, Types types) { 9 | super(chunkAccess, types); 10 | } 11 | 12 | @Override public boolean update(int x, int y, int z, BlockState state) { 13 | return false; 14 | } 15 | 16 | @Override public int getFirstAvailable(int x, int z) { 17 | return 0; 18 | } 19 | 20 | @Override public void setRawData(ChunkAccess clv, Types a, long[] heightmap) { 21 | } 22 | 23 | @Override public long[] getRawData() { 24 | return new long[0]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/ForcedCubesSaveData.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world; 2 | 3 | import it.unimi.dsi.fastutil.longs.LongOpenHashSet; 4 | import it.unimi.dsi.fastutil.longs.LongSet; 5 | import net.minecraft.nbt.CompoundTag; 6 | import net.minecraft.world.level.saveddata.SavedData; 7 | 8 | public class ForcedCubesSaveData extends SavedData { 9 | private LongSet cubes = new LongOpenHashSet(); 10 | 11 | public ForcedCubesSaveData() { 12 | this(new LongOpenHashSet()); 13 | } 14 | 15 | public ForcedCubesSaveData(LongOpenHashSet cubes) { 16 | this.cubes = cubes; 17 | } 18 | 19 | public static ForcedCubesSaveData load(CompoundTag compoundTag) { 20 | return new ForcedCubesSaveData(new LongOpenHashSet(compoundTag.getLongArray("Forced"))); 21 | } 22 | 23 | @Override 24 | public CompoundTag save(CompoundTag compound) { 25 | compound.putLongArray("Forced", this.cubes.toLongArray()); 26 | return compound; 27 | } 28 | 29 | public LongSet getCubes() { 30 | return this.cubes; 31 | } 32 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/SetupCubeStructureStart.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world; 2 | 3 | import java.util.Random; 4 | 5 | import net.minecraft.core.BlockPos; 6 | import net.minecraft.world.level.StructureFeatureManager; 7 | import net.minecraft.world.level.WorldGenLevel; 8 | import net.minecraft.world.level.chunk.ChunkGenerator; 9 | import net.minecraft.world.level.levelgen.structure.BoundingBox; 10 | 11 | public interface SetupCubeStructureStart { 12 | 13 | //We use a BlockPos as our final parameter in place of a chunk position. 14 | void placeInCube(WorldGenLevel worldGenLevel, StructureFeatureManager structureFeatureManager, ChunkGenerator chunkGenerator, Random random, BoundingBox boundingBox, BlockPos chunkPos); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/CubicLevelReader.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level; 2 | 3 | public interface CubicLevelReader { 4 | default boolean isCubic() { 5 | return false; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/CubicPersistentEntitySectionManager.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import net.minecraft.world.level.ChunkPos; 5 | 6 | public interface CubicPersistentEntitySectionManager { 7 | boolean isCubeTicking(CubePos pos); 8 | 9 | boolean isChunkTicking(ChunkPos pos); 10 | } 11 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/ColumnCubeGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk; 2 | 3 | public interface ColumnCubeGetter { 4 | 5 | CubeAccess getCube(int y); 6 | } 7 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/CubeBiomeContainer.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks3/c01634c41dd9741cd589f5a0d14858f610b81e2a/src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/CubeBiomeContainer.java -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/CubeSource.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import net.minecraft.world.level.chunk.ChunkStatus; 6 | 7 | public interface CubeSource { 8 | 9 | @Nullable 10 | CubeAccess getCube(int cubeX, int cubeY, int cubeZ, ChunkStatus requiredStatus, boolean load); 11 | 12 | CubeAccess getCubeNow(int cubeX, int cubeY, int cubeZ); 13 | 14 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/EmptyLevelCube.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import net.minecraft.world.level.Level; 5 | 6 | public class EmptyLevelCube extends LevelCube { 7 | public EmptyLevelCube(Level worldIn) { 8 | super(worldIn, CubePos.of(0, 0, 0)); 9 | } 10 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/LightCubeGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import net.minecraft.world.level.BlockGetter; 6 | 7 | public interface LightCubeGetter { 8 | @Nullable BlockGetter getCubeForLighting(int cubeX, int cubeY, int cubeZ); 9 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.chunk; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/storage/CubicEntityStorage.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk.storage; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import net.minecraft.world.entity.Entity; 7 | import net.minecraft.world.level.entity.ChunkEntities; 8 | 9 | public interface CubicEntityStorage { 10 | 11 | CompletableFuture> loadCubeEntities(CubePos pos); 12 | } 13 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/storage/CubicSectionStorage.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk.storage; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | import net.minecraft.nbt.CompoundTag; 5 | import net.minecraft.world.level.chunk.storage.IOWorker; 6 | 7 | public interface CubicSectionStorage { 8 | 9 | void flush(CubePos cubePos); 10 | 11 | void updateCube(CubePos pos, CompoundTag tag); 12 | 13 | IOWorker getIOWorker(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/storage/PoiDeserializationContext.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunk.storage; 2 | 3 | import net.minecraft.core.SectionPos; 4 | import net.minecraft.world.level.chunk.LevelChunkSection; 5 | 6 | public interface PoiDeserializationContext { 7 | 8 | void checkConsistencyWithBlocksForCube(SectionPos chunkPos, LevelChunkSection levelChunkSection); 9 | } 10 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunk/storage/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.chunk.storage; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunklike/CloAccess.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunklike; 2 | 3 | import io.github.opencubicchunks.cc_core.world.CubicLevelHeightAccessor; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeAccess; 5 | import net.minecraft.world.level.BlockGetter; 6 | import net.minecraft.world.level.biome.BiomeManager; 7 | import net.minecraft.world.level.chunk.ChunkAccess; 8 | import net.minecraft.world.level.chunk.FeatureAccess; 9 | 10 | public interface CloAccess extends BlockGetter, BiomeManager.NoiseBiomeSource, FeatureAccess, CubicLevelHeightAccessor { 11 | 12 | default CloPos getCloPos() { 13 | if (this instanceof CubeAccess) { 14 | return CloPos.cube(((CubeAccess) this).getCubePos()); 15 | } else { 16 | return CloPos.column(((ChunkAccess) this).getPos()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunklike/ImposterProtoClo.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunklike; 2 | 3 | public interface ImposterProtoClo extends ProtoClo { 4 | } 5 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunklike/LevelClo.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunklike; 2 | 3 | import net.minecraft.world.level.Level; 4 | 5 | public interface LevelClo extends CloAccess { 6 | Level getCloLevel(); 7 | } 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/chunklike/ProtoClo.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.level.chunklike; 2 | 3 | public interface ProtoClo extends CloAccess { 4 | } 5 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/levelgen/heightmap/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.levelgen.heightmap; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/levelgen/heightmap/surfacetrackertree/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level.levelgen.heightmap.surfacetrackertree; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/level/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.level; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/lighting/CubicLayerLightEngine.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.lighting; 2 | 3 | import com.google.common.annotations.VisibleForTesting; 4 | import io.github.opencubicchunks.cc_core.api.CubePos; 5 | 6 | public interface CubicLayerLightEngine { 7 | void retainCubeData(CubePos pos, boolean retain); 8 | 9 | void enableLightSources(CubePos cubePos, boolean enable); 10 | 11 | @VisibleForTesting 12 | void setCubic(); 13 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/lighting/CubicLayerLightSectionStorage.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.lighting; 2 | 3 | public interface CubicLayerLightSectionStorage { 4 | 5 | // retainData 6 | void retainCubeData(long cubeSectionPos, boolean retain); 7 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/lighting/CubicLevelLightEngine.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.lighting; 2 | 3 | import io.github.opencubicchunks.cc_core.api.CubePos; 4 | 5 | public interface CubicLevelLightEngine { 6 | 7 | void retainData(CubePos cubePos, boolean retain); 8 | 9 | void enableLightSources(CubePos cubePos, boolean retain); 10 | 11 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/lighting/CubicSkyLightEngine.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.lighting; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeAccess; 4 | 5 | public interface CubicSkyLightEngine { 6 | void doSkyLightForCube(CubeAccess cube); 7 | } 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/lighting/SkyLightColumnChecker.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.lighting; 2 | 3 | import io.github.opencubicchunks.cc_core.world.ColumnCubeMapGetter; 4 | 5 | public interface SkyLightColumnChecker { 6 | /** all parameters are global coordinates */ 7 | void checkSkyLightColumn(ColumnCubeMapGetter chunk, int x, int z, int oldHeight, int newHeight); 8 | } 9 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/lighting/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.lighting; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/server/CubicMinecraftServer.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.server; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | import io.github.opencubicchunks.cubicchunks.config.ServerConfig; 6 | 7 | public interface CubicMinecraftServer { 8 | @Nullable ServerConfig getServerConfig(); 9 | } 10 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/server/CubicServerLevel.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.server; 2 | 3 | import io.github.opencubicchunks.cc_core.world.heightmap.HeightmapStorage; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LevelCube; 5 | 6 | public interface CubicServerLevel { 7 | void onCubeUnloading(LevelCube cube); 8 | 9 | void tickCube(LevelCube cube, int randomTicks); 10 | 11 | HeightmapStorage getHeightmapStorage(); 12 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/server/CubicThreadedLevelLightEngine.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.world.server; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import io.github.opencubicchunks.cubicchunks.server.level.CubeTaskPriorityQueueSorter; 7 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.CubeAccess; 8 | import net.minecraft.util.thread.ProcessorHandle; 9 | 10 | public interface CubicThreadedLevelLightEngine { 11 | void postConstructorSetup(CubeTaskPriorityQueueSorter sorter, 12 | ProcessorHandle> taskExecutor); 13 | 14 | void setCubeStatusEmpty(CubePos cubePos); 15 | 16 | CompletableFuture lightCube(CubeAccess cube, boolean b); 17 | } -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/server/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.server; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/main/java/io/github/opencubicchunks/cubicchunks/world/storage/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.world.storage; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; -------------------------------------------------------------------------------- /src_old/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | MixinConnector: io.github.opencubicchunks.cubicchunks.mixin.CCMixinConnector 2 | -------------------------------------------------------------------------------- /src_old/main/resources/assets/cubicchunks/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "options.verticalRenderDistance": "Vertical View Distance", 3 | "options.vertical_chunks": "%s", 4 | "selectWorld.cubicChunks": "Use Cubic Chunks" 5 | } -------------------------------------------------------------------------------- /src_old/main/resources/cubicchunks.mixins.asm.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "io.github.opencubicchunks.cubicchunks.mixin.asm", 4 | "refmap": "CubicChunks-refmap.json", 5 | "plugin": "io.github.opencubicchunks.cubicchunks.mixin.ASMConfigPlugin", 6 | "compatibilityLevel": "JAVA_17", 7 | "minVersion": "0.8", 8 | "mixins": [ 9 | "common.MixinAsmTarget" 10 | ], 11 | "client": [], 12 | "server": [] 13 | } -------------------------------------------------------------------------------- /src_old/main/resources/cubicchunks.mixins.asmfixes.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "io.github.opencubicchunks.cubicchunks.mixin.asmfixes", 4 | "refmap": "CubicChunks-refmap.json", 5 | "compatibilityLevel": "JAVA_17", 6 | "minVersion": "0.8", 7 | "injectors": { 8 | "defaultRequire": 1 9 | }, 10 | "mixins": [ 11 | "common.level.NaturalSpawnerFixes", 12 | "common.ticket.DistanceManagerFixes" 13 | ], 14 | "client": [], 15 | "server": [] 16 | } -------------------------------------------------------------------------------- /src_old/main/resources/cubicchunks.mixins.debug.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": false, 3 | "package": "io.github.opencubicchunks.cubicchunks.mixin.debug", 4 | "refmap": "CubicChunks-refmap.json", 5 | "plugin": "io.github.opencubicchunks.cubicchunks.mixin.DebugMixinConfig", 6 | "compatibilityLevel": "JAVA_17", 7 | "minVersion": "0.8", 8 | "injectors": { 9 | "defaultRequire": 0 10 | }, 11 | "overwrites": { 12 | "conformVisibility": true 13 | }, 14 | "mixins": [ 15 | "common.MixinDistanceManager", 16 | "common.MixinMinecraftServer", 17 | "common.MixinPlayerRespawnLogic", 18 | "common.MixinServerLevel" 19 | ], 20 | "client": [ 21 | "client.MixinClientLevel", 22 | "client.MixinDebugRenderer", 23 | "client.MixinHeightMapRenderer", 24 | "client.MixinLevelRenderer", 25 | "client.MixinMinecraft", 26 | "client.MixinMinecraftServer" 27 | ], 28 | "server": [] 29 | } -------------------------------------------------------------------------------- /src_old/main/resources/cubicchunks.mixins.optifine.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "io.github.opencubicchunks.cubicchunks.mixin.optifine", 4 | "refmap": "CubicChunks-refmap.json", 5 | "plugin": "io.github.opencubicchunks.cubicchunks.mixin.OptiFineMixinConfig", 6 | "compatibilityLevel": "JAVA_17", 7 | "minVersion": "0.8", 8 | "injectors": { 9 | "defaultRequire": 1 10 | }, 11 | "mixins": [], 12 | "client": [ 13 | "client.vanilla.MixinWorldRenderer_Vanilla" 14 | ], 15 | "server": [] 16 | } -------------------------------------------------------------------------------- /src_old/main/resources/cubicchunks.mixins.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "io.github.opencubicchunks.cubicchunks.mixin.test", 4 | "refmap": "CubicChunks-refmap.json", 5 | "plugin": "io.github.opencubicchunks.cubicchunks.mixin.TestMixinConfig", 6 | "compatibilityLevel": "JAVA_17", 7 | "minVersion": "0.8", 8 | "injectors": { 9 | "defaultRequire": 1 10 | }, 11 | "overwrites": { 12 | "conformVisibility": true 13 | }, 14 | "mixins": [], 15 | "client": [], 16 | "server": [] 17 | } -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/levelgen/lighting/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.lighting; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/levelgen/placement/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.levelgen.placement; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/mock/interfaces/BlockGetterLightHeightmapGetterColumnCubeMapGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mock.interfaces; 2 | 3 | import io.github.opencubicchunks.cc_core.world.ColumnCubeMapGetter; 4 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LightHeightmapGetter; 5 | import net.minecraft.world.level.BlockGetter; 6 | 7 | public interface BlockGetterLightHeightmapGetterColumnCubeMapGetter extends BlockGetter, LightHeightmapGetter, ColumnCubeMapGetter { 8 | } 9 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/mock/interfaces/LightCubeChunkGetter.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.mock.interfaces; 2 | 3 | import io.github.opencubicchunks.cubicchunks.world.level.chunk.LightCubeGetter; 4 | import net.minecraft.world.level.chunk.LightChunkGetter; 5 | 6 | /** 7 | * Exists to mock both {@link LightChunkGetter} and {@link LightCubeGetter} at once 8 | */ 9 | public interface LightCubeChunkGetter extends LightChunkGetter, LightCubeGetter { 10 | } 11 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/mock/interfaces/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mock.interfaces; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/mock/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.mock; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/testutils/ColumnPos.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.testutils; 2 | 3 | import static io.github.opencubicchunks.cc_core.utils.Coords.sectionToCube; 4 | 5 | import io.github.opencubicchunks.cc_core.api.CubePos; 6 | import net.minecraft.world.level.ChunkPos; 7 | 8 | public record ColumnPos(int x, int z) { 9 | public static ColumnPos from(CubePos pos) { 10 | return new ColumnPos(pos.getX(), pos.getZ()); 11 | } 12 | 13 | public static ColumnPos from(ChunkPos pos) { 14 | return new ColumnPos(sectionToCube(pos.x), sectionToCube(pos.z)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/testutils/LightError.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.testutils; 2 | 3 | public record LightError(String message, String lightSliceInfo) { 4 | public void report() { 5 | System.err.println(this.lightSliceInfo); 6 | throw new AssertionError(this.message); 7 | } 8 | 9 | public void reportWithAdditional(String additionalMessage) { 10 | System.err.printf("%s\n%s\n", this.lightSliceInfo, additionalMessage); 11 | throw new AssertionError(this.message); 12 | } 13 | } -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/testutils/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.testutils; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/utils/BufferUtilsTest.java: -------------------------------------------------------------------------------- 1 | package io.github.opencubicchunks.cubicchunks.utils; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import io.netty.buffer.Unpooled; 6 | import net.minecraft.network.FriendlyByteBuf; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class BufferUtilsTest { 10 | @Test 11 | public void testReadWrite() { 12 | // IntStream.range(Integer.MIN_VALUE, Integer.MAX_VALUE).parallel().forEach(this::testValue); 13 | testValue(Integer.MAX_VALUE); 14 | testValue(Integer.MIN_VALUE); 15 | testValue(0); 16 | testValue(1); 17 | testValue(-1); 18 | } 19 | 20 | private void testValue(int val) { 21 | FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.wrappedBuffer(new byte[8])); 22 | buf.resetWriterIndex(); 23 | buf.resetReaderIndex(); 24 | 25 | BufferUtils.writeSignedVarInt(buf, val); 26 | assertEquals(val, BufferUtils.readSignedVarInt(buf)); 27 | } 28 | } -------------------------------------------------------------------------------- /src_old/test/java/io/github/opencubicchunks/cubicchunks/utils/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package io.github.opencubicchunks.cubicchunks.utils; 4 | 5 | import javax.annotation.ParametersAreNonnullByDefault; 6 | 7 | import io.github.opencubicchunks.cc_core.annotation.MethodsReturnNonnullByDefault; 8 | --------------------------------------------------------------------------------