├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report_112.md
│ └── bug_report_115plus.md
└── workflows
│ ├── build_and_publish.yml
│ └── build_pr.yml
├── .gitignore
├── .gitmodules
├── .idea
└── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── .lgtm.yml
├── .travis.yml
├── CubicChunksAPI
├── HEADER.txt
├── build.gradle.kts
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle.kts
└── src
│ └── main
│ └── java
│ └── io
│ └── github
│ └── opencubicchunks
│ └── cubicchunks
│ └── api
│ ├── util
│ ├── Bits.java
│ ├── Box.java
│ ├── Coords.java
│ ├── CubePos.java
│ ├── IntRange.java
│ ├── MathUtil.java
│ ├── NotCubicChunksWorldException.java
│ ├── XYZAddressable.java
│ ├── XYZMap.java
│ ├── XZAddressable.java
│ └── XZMap.java
│ ├── world
│ ├── CubeDataEvent.java
│ ├── CubeEvent.java
│ ├── CubeUnWatchEvent.java
│ ├── CubeWatchEvent.java
│ ├── IColumn.java
│ ├── ICube.java
│ ├── ICubeProvider.java
│ ├── ICubeProviderServer.java
│ ├── ICubeWatcher.java
│ ├── ICubicTicket.java
│ ├── ICubicWorld.java
│ ├── ICubicWorldServer.java
│ ├── ICubicWorldType.java
│ ├── IHeightMap.java
│ ├── IMinMaxHeight.java
│ └── storage
│ │ ├── ICubicStorage.java
│ │ └── StorageFormatProviderBase.java
│ └── worldgen
│ ├── CubeGeneratorsRegistry.java
│ ├── CubePrimer.java
│ ├── ICubeGenerator.java
│ ├── LoadingData.java
│ ├── VanillaCompatibilityGeneratorProviderBase.java
│ ├── populator
│ ├── CubePopulatorEvent.java
│ ├── CubicPopulatorList.java
│ ├── ICubicPopulator.java
│ ├── WorldGenEntitySpawner.java
│ └── event
│ │ ├── CubeGeneratorEvent.java
│ │ ├── CubicOreGenEvent.java
│ │ ├── DecorateCubeBiomeEvent.java
│ │ └── PopulateCubeEvent.java
│ └── structure
│ ├── ICubicStructureGenerator.java
│ ├── event
│ └── InitCubicStructureGeneratorEvent.java
│ └── feature
│ ├── CubicFeatureData.java
│ ├── CubicFeatureGenerator.java
│ ├── ICubicFeatureGenerator.java
│ └── ICubicFeatureStart.java
├── HEADER.txt
├── Jenkinsfile
├── NOTICE.md
├── README.md
├── Tall Worlds
└── changelog.txt
├── build.gradle.kts
├── code-formatters
├── eclipse-formatter
│ ├── eclipse.importorder.txt
│ ├── eclipse_cleanup.xml
│ └── eclipse_formatter.xml
└── intellij-idea-formatter
│ └── intellij_style.xml
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── intellij-logo.png
├── jitpack.yml
├── license.txt
├── settings.gradle.kts
└── src
├── main
├── java
│ └── io
│ │ └── github
│ │ └── opencubicchunks
│ │ └── cubicchunks
│ │ └── core
│ │ ├── CommonEventHandler.java
│ │ ├── CubicChunks.java
│ │ ├── CubicChunksConfig.java
│ │ ├── asm
│ │ ├── CubicChunksCoreContainer.java
│ │ ├── CubicChunksMixinConfig.java
│ │ ├── MixinUtils.java
│ │ ├── coremod
│ │ │ └── CubicChunksCoreMod.java
│ │ ├── mixin
│ │ │ ├── ICubicWorldInternal.java
│ │ │ ├── ICubicWorldSettings.java
│ │ │ ├── core
│ │ │ │ ├── client
│ │ │ │ │ ├── IChunkProviderClient.java
│ │ │ │ │ ├── IContainerLocalRenderInformation.java
│ │ │ │ │ ├── IGuiCreateWorld.java
│ │ │ │ │ ├── IGuiOptionsRowList.java
│ │ │ │ │ ├── IGuiScreen.java
│ │ │ │ │ ├── INetHandlerPlayClient.java
│ │ │ │ │ ├── IViewFrustum.java
│ │ │ │ │ ├── MixinChunkCache_HeightLimits.java
│ │ │ │ │ ├── MixinChunk_Cubes.java
│ │ │ │ │ ├── MixinDebugRenderChunkBorder.java
│ │ │ │ │ ├── MixinEmptyChunk.java
│ │ │ │ │ ├── MixinRenderGlobal.java
│ │ │ │ │ ├── MixinViewFrustum_RenderHeightFix.java
│ │ │ │ │ ├── MixinWorldClient.java
│ │ │ │ │ ├── MixinWorldProvider.java
│ │ │ │ │ └── MixinWorld_HeightLimits.java
│ │ │ │ ├── common
│ │ │ │ │ ├── IBlockStateContainer.java
│ │ │ │ │ ├── IForgeChunkManager.java
│ │ │ │ │ ├── IGameRegistry.java
│ │ │ │ │ ├── IIntegratedServer.java
│ │ │ │ │ ├── IPlayerChunkMapEntry.java
│ │ │ │ │ ├── MixinAnvilSaveHandler.java
│ │ │ │ │ ├── MixinChunkCache_HeightLimits.java
│ │ │ │ │ ├── MixinChunk_Column.java
│ │ │ │ │ ├── MixinChunk_Cubes.java
│ │ │ │ │ ├── MixinDerivedWorldInfo.java
│ │ │ │ │ ├── MixinEntityTracker.java
│ │ │ │ │ ├── MixinEntityTrackerEntry.java
│ │ │ │ │ ├── MixinEntity_DeathFix.java
│ │ │ │ │ ├── MixinIBlockAccess_MinMaxHeight.java
│ │ │ │ │ ├── MixinMinecraftServer.java
│ │ │ │ │ ├── MixinPlayerList.java
│ │ │ │ │ ├── MixinRegionFileCache.java
│ │ │ │ │ ├── MixinStructureStart.java
│ │ │ │ │ ├── MixinWorld.java
│ │ │ │ │ ├── MixinWorldEntitySpawner.java
│ │ │ │ │ ├── MixinWorldInfo.java
│ │ │ │ │ ├── MixinWorldProvider.java
│ │ │ │ │ ├── MixinWorldServer.java
│ │ │ │ │ ├── MixinWorldSettings.java
│ │ │ │ │ ├── MixinWorld_HeightLimits.java
│ │ │ │ │ ├── MixinWorld_Tick.java
│ │ │ │ │ ├── forge
│ │ │ │ │ │ ├── MixinForgeChunkManager.java
│ │ │ │ │ │ └── MixinTicket.java
│ │ │ │ │ └── vanillaclient
│ │ │ │ │ │ ├── ICPacketPlayer.java
│ │ │ │ │ │ ├── ICPacketPlayerDigging.java
│ │ │ │ │ │ ├── ICPacketPlayerTryUseItemOnBlock.java
│ │ │ │ │ │ ├── ICPacketTabComplete.java
│ │ │ │ │ │ ├── ICPacketUpdateSign.java
│ │ │ │ │ │ ├── ICPacketVehicleMove.java
│ │ │ │ │ │ ├── ISPacketChunkData.java
│ │ │ │ │ │ └── ISPacketMultiBlockChange.java
│ │ │ │ └── server
│ │ │ │ │ ├── MixinDedicatedPlayerList.java
│ │ │ │ │ └── MixinDedicatedServer_HeightLimits.java
│ │ │ ├── core_sided
│ │ │ │ ├── bukkit
│ │ │ │ │ └── common
│ │ │ │ │ │ ├── MixinChunk_Cubes_Bukkit_Sided.java
│ │ │ │ │ │ ├── MixinPlayerList_Bukkit_Sided.java
│ │ │ │ │ │ └── MixinWorld_HeightLimits_Bukkit_Sided.java
│ │ │ │ └── vanilla
│ │ │ │ │ └── common
│ │ │ │ │ ├── MixinChunk_Cubes_Vanilla_Sided.java
│ │ │ │ │ ├── MixinPlayerList_Vanilla_Sided.java
│ │ │ │ │ └── MixinWorld_HeightLimits_Vanilla_Sided.java
│ │ │ ├── fixes
│ │ │ │ ├── client
│ │ │ │ │ ├── MixinEntityPlayerSP.java
│ │ │ │ │ ├── MixinEntity_PrepareSpawn.java
│ │ │ │ │ └── isblockloaded
│ │ │ │ │ │ └── MixinEntity.java
│ │ │ │ ├── common
│ │ │ │ │ ├── EntityBat_AiHeightLimit.java
│ │ │ │ │ ├── MixinBiomeTemperatureConfig.java
│ │ │ │ │ ├── MixinBlockBeaconAsyncUpdate.java
│ │ │ │ │ ├── MixinBlockChorusFlower.java
│ │ │ │ │ ├── MixinBlockFalling_HeightLimits.java
│ │ │ │ │ ├── MixinBlockGrass.java
│ │ │ │ │ ├── MixinBlockLilyPad_HeightLimits.java
│ │ │ │ │ ├── MixinBlockMushroom.java
│ │ │ │ │ ├── MixinBlockPortal_Size_HeightLimits.java
│ │ │ │ │ ├── MixinBlockSkull_WitherSpawnLimits.java
│ │ │ │ │ ├── MixinBlockStaticLiquid.java
│ │ │ │ │ ├── MixinCubicEndWorkaround.java
│ │ │ │ │ ├── MixinEntityBoat.java
│ │ │ │ │ ├── MixinEntityFallingBlock_HeightLimits.java
│ │ │ │ │ ├── MixinEntityLivingBase.java
│ │ │ │ │ ├── MixinEntityMinecart_KillFix.java
│ │ │ │ │ ├── MixinItemChorusFruit.java
│ │ │ │ │ ├── MixinNetHandlerPlayServer.java
│ │ │ │ │ ├── MixinPacketBufferBlockPosWrite.java
│ │ │ │ │ ├── MixinPathNavigateGround.java
│ │ │ │ │ ├── MixinRandomPositionGenerator.java
│ │ │ │ │ ├── MixinTeleporter.java
│ │ │ │ │ ├── MixinTileEntityEndGateway.java
│ │ │ │ │ ├── MixinWalkNodeProcessor_HeightLimit.java
│ │ │ │ │ ├── MixinWorld.java
│ │ │ │ │ ├── fakeheight
│ │ │ │ │ │ ├── IASMEventHandler.java
│ │ │ │ │ │ ├── IEventBus.java
│ │ │ │ │ │ ├── MixinBiomeDecorator.java
│ │ │ │ │ │ ├── MixinForgeEventFactory.java
│ │ │ │ │ │ └── MixinTerrainGen.java
│ │ │ │ │ ├── isblockloaded
│ │ │ │ │ │ └── MixinEntity.java
│ │ │ │ │ ├── vanillaclient
│ │ │ │ │ │ ├── INetHandlerPlayServer.java
│ │ │ │ │ │ ├── MixinNetHandlerPlayServer.java
│ │ │ │ │ │ ├── MixinSPacketBlockAction.java
│ │ │ │ │ │ ├── MixinSPacketBlockBreakAnim.java
│ │ │ │ │ │ ├── MixinSPacketBlockChange.java
│ │ │ │ │ │ ├── MixinSPacketCustomSound.java
│ │ │ │ │ │ ├── MixinSPacketEffect.java
│ │ │ │ │ │ ├── MixinSPacketEntityLookMove.java
│ │ │ │ │ │ ├── MixinSPacketEntityTeleport.java
│ │ │ │ │ │ ├── MixinSPacketExplosion.java
│ │ │ │ │ │ ├── MixinSPacketMoveVehicle.java
│ │ │ │ │ │ ├── MixinSPacketParticles.java
│ │ │ │ │ │ ├── MixinSPacketPlayerPosLook.java
│ │ │ │ │ │ ├── MixinSPacketSignEditorOpen.java
│ │ │ │ │ │ ├── MixinSPacketSoundEffect.java
│ │ │ │ │ │ ├── MixinSPacketSpawnExperienceOrb.java
│ │ │ │ │ │ ├── MixinSPacketSpawnGlobalEntity.java
│ │ │ │ │ │ ├── MixinSPacketSpawnMob.java
│ │ │ │ │ │ ├── MixinSPacketSpawnObject.java
│ │ │ │ │ │ ├── MixinSPacketSpawnPainting.java
│ │ │ │ │ │ ├── MixinSPacketSpawnPlayer.java
│ │ │ │ │ │ ├── MixinSPacketSpawnPosition.java
│ │ │ │ │ │ ├── MixinSPacketUpdateTileEntity.java
│ │ │ │ │ │ └── MixinSPacketUseBed.java
│ │ │ │ │ └── worldgen
│ │ │ │ │ │ ├── MixinWorldGenBigMushroom.java
│ │ │ │ │ │ ├── MixinWorldGenBlockBlob.java
│ │ │ │ │ │ ├── MixinWorldGenBonusChest.java
│ │ │ │ │ │ ├── MixinWorldGenDeadBush.java
│ │ │ │ │ │ ├── MixinWorldGenDesertWells.java
│ │ │ │ │ │ ├── MixinWorldGenDoublePlants.java
│ │ │ │ │ │ ├── MixinWorldGenDungeons.java
│ │ │ │ │ │ ├── MixinWorldGenFlowers.java
│ │ │ │ │ │ ├── MixinWorldGenFossils.java
│ │ │ │ │ │ ├── MixinWorldGenIcePath.java
│ │ │ │ │ │ ├── MixinWorldGenIceSpike.java
│ │ │ │ │ │ ├── MixinWorldGenLakes.java
│ │ │ │ │ │ ├── MixinWorldGenSpikes.java
│ │ │ │ │ │ ├── MixinWorldGenTallGrass.java
│ │ │ │ │ │ ├── MixinWorldGenVines.java
│ │ │ │ │ │ └── tree
│ │ │ │ │ │ ├── MixinWorldGenCanopyTree.java
│ │ │ │ │ │ ├── MixinWorldGenHugeTrees.java
│ │ │ │ │ │ ├── MixinWorldGenShrub.java
│ │ │ │ │ │ ├── MixinWorldGenSwamp.java
│ │ │ │ │ │ ├── MixinWorldGenTaiga1.java
│ │ │ │ │ │ ├── MixinWorldGenTaiga2.java
│ │ │ │ │ │ ├── MixinWorldGenTree_BirchSavanna.java
│ │ │ │ │ │ └── MixinWorldGenTrees.java
│ │ │ │ └── package-info.java
│ │ │ ├── noncritical
│ │ │ │ ├── client
│ │ │ │ │ ├── MixinGuiOverlayDebug.java
│ │ │ │ │ ├── MixinRenderChunk.java
│ │ │ │ │ ├── MixinRenderWorker.java
│ │ │ │ │ └── MixinViewFrustum_VertViewDistance.java
│ │ │ │ ├── common
│ │ │ │ │ ├── MixinBlockPistonBase_HeightFix.java
│ │ │ │ │ ├── MixinTileEntityBeacon.java
│ │ │ │ │ └── command
│ │ │ │ │ │ ├── MixinCommandBase.java
│ │ │ │ │ │ ├── MixinCommandFill.java
│ │ │ │ │ │ ├── MixinCommandTP.java
│ │ │ │ │ │ ├── MixinCommandTeleport.java
│ │ │ │ │ │ └── MixinCommandsHeightLimits.java
│ │ │ │ └── package-info.java
│ │ │ └── selectable
│ │ │ │ ├── client
│ │ │ │ ├── IGuiVideoSettings.java
│ │ │ │ ├── MixinChunkCache_Cubic.java
│ │ │ │ ├── MixinChunkCache_Vanilla.java
│ │ │ │ ├── MixinRenderGlobalNoOptifine.java
│ │ │ │ ├── optifine
│ │ │ │ │ ├── MixinChunkVisibility.java
│ │ │ │ │ ├── MixinExtendedBlockStorage.java
│ │ │ │ │ ├── MixinRenderChunk.java
│ │ │ │ │ ├── MixinRenderChunkUtils.java
│ │ │ │ │ ├── MixinRenderGlobalOptifine_E.java
│ │ │ │ │ ├── MixinRenderList.java
│ │ │ │ │ └── MixinViewFrustum.java
│ │ │ │ └── vertviewdist
│ │ │ │ │ ├── MixinEntityRenderer.java
│ │ │ │ │ ├── MixinRenderGlobal.java
│ │ │ │ │ └── MixinRenderGlobalNoOptifine.java
│ │ │ │ └── common
│ │ │ │ ├── MixinChunkCache.java
│ │ │ │ ├── MixinPathNavigate.java
│ │ │ │ ├── MixinTileEntityBeaconBetterFps.java
│ │ │ │ ├── MixinWalkNodeProcessor.java
│ │ │ │ ├── MixinWorldServer_UpdateBlocks.java
│ │ │ │ ├── MixinWorld_CollisionCheck.java
│ │ │ │ └── MixinWorld_SlowCollisionCheck.java
│ │ ├── optifine
│ │ │ ├── ChunkPos3.java
│ │ │ ├── IOptifineExtendedBlockStorage.java
│ │ │ └── IOptifineRenderChunk.java
│ │ └── transformer
│ │ │ ├── AddEmptyConstructorToChunk.java
│ │ │ └── CubicChunksWorldEditTransformer.java
│ │ ├── block
│ │ └── state
│ │ │ ├── BlockStairsFieldBasedBlockStateContainer.java
│ │ │ ├── BlockStairsFieldBasedStateImplementation.java
│ │ │ ├── FullBlockBlockStateContainer.java
│ │ │ ├── FullBlockStateImplementation.java
│ │ │ ├── NonCollidingBlockStateContainer.java
│ │ │ └── NonCollidingBlockStateImplementation.java
│ │ ├── client
│ │ ├── ClientEventHandler.java
│ │ ├── CubeProviderClient.java
│ │ └── RenderCubeCache.java
│ │ ├── debug
│ │ └── Dbg.java
│ │ ├── entity
│ │ └── ICubicEntityTracker.java
│ │ ├── lighting
│ │ ├── FirstLightProcessor.java
│ │ ├── ILightBlockAccess.java
│ │ ├── ILightingManager.java
│ │ ├── LightUpdateQueue.java
│ │ ├── LightingManager.java
│ │ ├── SkyLightUpdateCubeSelector.java
│ │ └── phosphor
│ │ │ ├── LightingEngineHelpers.java
│ │ │ ├── LightingHooks.java
│ │ │ ├── PhosphorLightEngine.java
│ │ │ └── PooledLightUpdateQueue.java
│ │ ├── network
│ │ ├── AbstractClientMessageHandler.java
│ │ ├── AbstractMessageHandler.java
│ │ ├── AbstractServerMessageHandler.java
│ │ ├── PacketColumn.java
│ │ ├── PacketCubeBlockChange.java
│ │ ├── PacketCubeSkyLightUpdates.java
│ │ ├── PacketCubes.java
│ │ ├── PacketCubicWorldData.java
│ │ ├── PacketDispatcher.java
│ │ ├── PacketHeightMapUpdate.java
│ │ ├── PacketUnloadColumn.java
│ │ ├── PacketUnloadCube.java
│ │ └── WorldEncoder.java
│ │ ├── server
│ │ ├── ChunkGc.java
│ │ ├── ColumnWatcher.java
│ │ ├── CubeProviderServer.java
│ │ ├── CubeWatcher.java
│ │ ├── CubicAnvilChunkLoader.java
│ │ ├── EmptyColumn.java
│ │ ├── ICubicPlayerList.java
│ │ ├── PlayerCubeMap.java
│ │ ├── SpawnCubes.java
│ │ ├── VanillaNetworkHandler.java
│ │ ├── WatcherPlayerEntry.java
│ │ ├── chunkio
│ │ │ ├── AsyncBatchingCubeIO.java
│ │ │ ├── ICubeIO.java
│ │ │ ├── IONbtReader.java
│ │ │ ├── IONbtWriter.java
│ │ │ ├── RegionCubeStorage.java
│ │ │ ├── async
│ │ │ │ └── forge
│ │ │ │ │ ├── AsyncColumnIOProvider.java
│ │ │ │ │ ├── AsyncCubeIOProvider.java
│ │ │ │ │ ├── AsyncIOProvider.java
│ │ │ │ │ ├── AsyncWorldIOExecutor.java
│ │ │ │ │ ├── QueuedColumn.java
│ │ │ │ │ └── QueuedCube.java
│ │ │ └── region
│ │ │ │ └── ShadowPagingRegion.java
│ │ └── vanillaproxy
│ │ │ └── IPositionPacket.java
│ │ ├── util
│ │ ├── AddressTools.java
│ │ ├── BucketSorterEntry.java
│ │ ├── CompatHandler.java
│ │ ├── Mappings.java
│ │ ├── PacketUtils.java
│ │ ├── PlatformCompatUtils.java
│ │ ├── ReflectionUtil.java
│ │ ├── SideUtils.java
│ │ ├── WatchersSortingList.java
│ │ ├── WatchersSortingList2D.java
│ │ ├── WatchersSortingList3D.java
│ │ ├── ticket
│ │ │ ├── ITicket.java
│ │ │ └── TicketList.java
│ │ └── world
│ │ │ ├── CubeSplitTickList.java
│ │ │ └── CubeSplitTickSet.java
│ │ ├── visibility
│ │ ├── CubeSelector.java
│ │ └── CuboidalCubeSelector.java
│ │ ├── world
│ │ ├── BlankEntityContainer.java
│ │ ├── ClientHeightMap.java
│ │ ├── CubeWorldEntitySpawner.java
│ │ ├── EntityContainer.java
│ │ ├── IColumnInternal.java
│ │ ├── ICubeProviderInternal.java
│ │ ├── ICubicChunkCache.java
│ │ ├── IWorldEntitySpawner.java
│ │ ├── NewServerHeightMap.java
│ │ ├── ServerHeightMap.java
│ │ ├── SpawnPlaceFinder.java
│ │ ├── StagingHeightMap.java
│ │ ├── WorldSavedCubicChunksData.java
│ │ ├── chunkloader
│ │ │ ├── CubicChunkManager.java
│ │ │ ├── ForceCubeEvent.java
│ │ │ ├── ICubicTicketInternal.java
│ │ │ └── UnforceCubeEvent.java
│ │ ├── column
│ │ │ ├── ColumnTileEntityMap.java
│ │ │ └── CubeMap.java
│ │ ├── cube
│ │ │ ├── BlankCube.java
│ │ │ └── Cube.java
│ │ ├── provider
│ │ │ └── ICubicWorldProvider.java
│ │ └── type
│ │ │ └── VanillaCubicWorldType.java
│ │ └── worldgen
│ │ ├── WorldgenHangWatchdog.java
│ │ └── generator
│ │ ├── GlobalGeneratorConfig.java
│ │ ├── WorldGenUtils.java
│ │ └── vanilla
│ │ └── VanillaCompatibilityGenerator.java
└── resources
│ ├── assets
│ └── cubicchunks
│ │ ├── lang
│ │ ├── en_US.lang
│ │ └── ru_ru.lang
│ │ ├── logo.png
│ │ ├── models
│ │ └── item
│ │ │ ├── get_light_value.json
│ │ │ └── relight_sky_block.json
│ │ └── textures
│ │ └── item
│ │ ├── get_light_value.png
│ │ └── relight_sky_block.png
│ ├── cubicchunks.mixins.core.json
│ ├── cubicchunks.mixins.core_sided.bukkit.json
│ ├── cubicchunks.mixins.core_sided.vanilla.json
│ ├── cubicchunks.mixins.fixes.json
│ ├── cubicchunks.mixins.noncritical.json
│ ├── cubicchunks.mixins.selectable.json
│ ├── log4j2.xml
│ └── mcmod.info
└── test
└── java
└── cubicchunks
├── TestOpacityIndex.java
└── TestWatchersSortingList.java
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report_112.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report (1.12)
3 | about: Report an issue with the 1.12 version
4 | title: ''
5 | labels: '1.12'
6 | assignees: ''
7 |
8 | ---
9 | # Version Information
10 | Minecraft version:
11 | Forge version:
12 | Other mods (if applicable):
13 |
14 | # Steps to reproduce:
15 | 1.
16 | 2.
17 | 3.
18 |
19 | Expected Behavior:
20 |
21 | Actual Behavior:
22 |
23 | Link to crash log (if applicable - use a site such as [hastebin](https://hastebin.com/):
24 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report_115plus.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report (1.15+)
3 | about: Report an issue with the work in progress 1.15/1.16 versions
4 | title: ''
5 | labels: '1.15 / 1.16'
6 | assignees: ''
7 |
8 | ---
9 | # Version Information
10 | Minecraft version:
11 | Forge version:
12 | Other mods (if applicable):
13 |
14 | # Steps to reproduce:
15 | 1.
16 | 2.
17 | 3.
18 |
19 | Expected Behavior:
20 |
21 | Actual Behavior:
22 |
23 | Link to crash log (if applicable - use a site such as [hastebin](https://hastebin.com/):
24 |
--------------------------------------------------------------------------------
/.github/workflows/build_and_publish.yml:
--------------------------------------------------------------------------------
1 | name: Java CI
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'MC_1.12'
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v4
12 | - uses: actions/cache@v4
13 | with:
14 | path: |
15 | ~/.gradle/caches
16 | ~/.gradle/wrapper
17 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
18 | restore-keys: |
19 | ${{ runner.os }}-gradle-
20 | - name: Set up git submodules
21 | run: git submodule init && git submodule update
22 | - name: Set up JDK 1.8
23 | uses: actions/setup-java@v4
24 | with:
25 | distribution: 'temurin'
26 | java-version: '8'
27 | - name: Build with Gradle
28 | env:
29 | sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
30 | sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
31 | run: ./gradlew build publish
32 | - uses: actions/upload-artifact@v4
33 | with:
34 | name: Compiled jars
35 | path: build/libs/*
--------------------------------------------------------------------------------
/.github/workflows/build_pr.yml:
--------------------------------------------------------------------------------
1 | name: Build Pull Request
2 |
3 | on: [pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v4
10 | - uses: actions/cache@v4
11 | with:
12 | path: |
13 | ~/.gradle/caches
14 | ~/.gradle/wrapper
15 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
16 | restore-keys: |
17 | ${{ runner.os }}-gradle-
18 | - name: Set up git submodules
19 | run: git submodule init && git submodule update
20 | - name: Set up JDK 1.8
21 | uses: actions/setup-java@v1
22 | with:
23 | java-version: 1.8
24 | - name: Build with Gradle
25 | run: ./gradlew build
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build #
2 | #########
3 | MANIFEST.MF
4 | dependency-reduced-pom.xml
5 | .checkstyle
6 | build.py
7 |
8 | # Compiled #
9 | ############
10 | bin
11 | build
12 | dist
13 | lib
14 | out
15 | run
16 | run/**
17 | .mixin.out
18 | .mixin.out/**
19 | target
20 | *.com
21 | *.class
22 | *.dll
23 | *.exe
24 | *.o
25 | *.so
26 | classes/
27 |
28 | # Databases #
29 | #############
30 | *.db
31 | *.sql
32 | *.sqlite
33 |
34 | # Packages #
35 | ############
36 | *.7z
37 | *.dmg
38 | *.gz
39 | *.iso
40 | *.rar
41 | *.tar
42 | *.zip
43 |
44 | # Repository #
45 | ##############
46 | .git
47 |
48 | # Logging #
49 | ###########
50 | /logs
51 | *.log
52 |
53 | # Misc #
54 | ########
55 | *.bak
56 | *.hprof
57 | *~
58 |
59 | # Libraries #
60 | #############
61 | /libs
62 |
63 | # System #
64 | ##########
65 | .DS_Store
66 | ehthumbs.db
67 | Thumbs.db
68 |
69 | # Project #
70 | ###########
71 | .classpath
72 | .externalToolBuilders
73 | .gradle
74 | .nb-gradle
75 | .project
76 | .settings
77 | eclipse
78 | nbproject
79 | atlassian-ide-plugin.xml
80 | build.xml
81 | nb-configuration.xml
82 | *.iml
83 | *.ipr
84 | *.iws
85 |
86 | # eclipse
87 | bin
88 | *.launch
89 | .settings
90 | .metadata
91 | .classpath
92 | .project
93 |
94 | # idea
95 | out
96 | *.ipr
97 | *.iws
98 | *.iml
99 | .idea/*
100 | !.idea/codeStyles/
101 |
102 | # gradle
103 | build
104 | .gradle
105 |
106 | # other
107 | eclipse
108 | run
109 |
110 | .nb-gradle-properties
111 | VERSION
112 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "buildSrc"]
2 | path = buildSrc
3 | url = https://github.com/OpenCubicChunks/CubicGradle
4 | [submodule "CubicChunksAPI/buildSrc"]
5 | path = CubicChunksAPI/buildSrc
6 | url = https://github.com/OpenCubicChunks/CubicGradle
7 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.lgtm.yml:
--------------------------------------------------------------------------------
1 | extraction:
2 | java:
3 | before_index:
4 | - ./gradlew --debug setupDecompWorkspace
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: required
2 | dist: trusty
3 |
4 | language: java
5 | cache:
6 | directories:
7 | - $HOME/.gradle
8 | jdk:
9 | - openjdk8
10 | - oraclejdk8
11 |
12 | env: GRADLE_OPTS="-Xmx2500M"
13 | before_install:
14 | # workaround to get "git describe" working
15 | - git fetch --unshallow --tags
16 | - git describe
17 | - ./gradlew setupCiWorkspace
18 | #setupCIWorkspace is needed because of https://github.com/MinecraftForge/ForgeGradle/issues/410
19 | # clean because of https://github.com/SpongePowered/MixinGradle/issues/4
20 | script: ./gradlew clean build
21 | deploy:
22 | - provider: script
23 | script: "./gradlew clean publish"
24 | skip_cleanup: true
25 | on:
26 | repo: OpenCubicChunks/CubicChunks
27 | # check the branch with regex to match master and MC_version branches
28 | condition: $TRAVIS_BRANCH =~ ^(master|MC_([0-9]+\.)+[0-9]+)$
29 | all_branches: true
30 |
31 | notifications:
32 | email: false
33 |
34 |
--------------------------------------------------------------------------------
/CubicChunksAPI/HEADER.txt:
--------------------------------------------------------------------------------
1 | This file is part of ${project}, licensed under the MIT License (MIT).
2 |
3 | Copyright (c) ${year} OpenCubicChunks
4 | Copyright (c) ${year} contributors
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
--------------------------------------------------------------------------------
/CubicChunksAPI/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.parallel=true
2 | systemProp.net.minecraftforge.gradle.check.certs=false
3 |
4 | licenseYear=2015-2021
5 | projectName=Cubic Chunks Mod
6 | description=CubicChunksAPI
7 | doRelease=false
--------------------------------------------------------------------------------
/CubicChunksAPI/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks/7165b37d6c85d123a442fb9079f8dda1e7a6247d/CubicChunksAPI/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CubicChunksAPI/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/CubicChunksAPI/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | maven {
5 | name = "NeoForged"
6 | setUrl("https://maven.neoforged.net/releases")
7 | }
8 | maven {
9 | setUrl("https://repo.spongepowered.org/repository/maven-public/")
10 | }
11 | maven {
12 | name = "Garden of Fancy"
13 | setUrl("https://maven.gofancy.wtf/releases")
14 | }
15 | }
16 | }
17 | plugins {
18 | id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0")
19 | }
20 | rootProject.name = "CubicChunksAPI"
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/util/NotCubicChunksWorldException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.util;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 |
29 | import javax.annotation.ParametersAreNonnullByDefault;
30 |
31 | @ParametersAreNonnullByDefault
32 | @MethodsReturnNonnullByDefault
33 | public class NotCubicChunksWorldException extends RuntimeException {
34 |
35 | public NotCubicChunksWorldException() {
36 | super();
37 | }
38 |
39 | public NotCubicChunksWorldException(String message) {
40 | super(message);
41 | }
42 |
43 | public NotCubicChunksWorldException(String message, Throwable cause) {
44 | super(message, cause);
45 | }
46 |
47 | public NotCubicChunksWorldException(Throwable cause) {
48 | super(cause);
49 | }
50 |
51 | protected NotCubicChunksWorldException(String message, Throwable cause,
52 | boolean enableSuppression,
53 | boolean writableStackTrace) {
54 | super(message, cause, enableSuppression, writableStackTrace);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/util/XYZAddressable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.util;
26 |
27 | /**
28 | * Classes implementing this interface represent objects in a 3-dimensional cartesian coordinate system.
29 | *
30 | * @see XYZMap
31 | */
32 |
33 | public interface XYZAddressable {
34 |
35 | int getX();
36 |
37 | int getY();
38 |
39 | int getZ();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/util/XZAddressable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.util;
26 |
27 | /**
28 | * Classes implementing this interface represent objects in a 2-dimensional cartesian coordinate system.
29 | *
30 | * @see XZMap
31 | */
32 | public interface XZAddressable {
33 |
34 | int getX();
35 |
36 | int getZ();
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/CubeDataEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import net.minecraft.nbt.NBTTagCompound;
28 |
29 | /**
30 | * CubicChunks equivalent of {@link net.minecraftforge.event.world.ChunkDataEvent}
31 | */
32 | public class CubeDataEvent extends CubeEvent {
33 |
34 | private final NBTTagCompound data;
35 |
36 | public CubeDataEvent(ICube cube, NBTTagCompound data) {
37 | super(cube);
38 | this.data = data;
39 | }
40 |
41 | public NBTTagCompound getData() {
42 | return data;
43 | }
44 |
45 | /**
46 | * CubicChunks equivalent of {@link net.minecraftforge.event.world.ChunkDataEvent.Load}
47 | */
48 | public static class Load extends CubeDataEvent {
49 | public Load(ICube cube, NBTTagCompound data) {
50 | super(cube, data);
51 | }
52 | }
53 |
54 | /**
55 | * CubicChunks equivalent of {@link net.minecraftforge.event.world.ChunkDataEvent.Save}
56 | */
57 | public static class Save extends CubeDataEvent {
58 | public Save(ICube cube, NBTTagCompound data) {
59 | super(cube, data);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/CubeEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import net.minecraftforge.event.world.WorldEvent;
28 |
29 | /**
30 | * CubicChunks equivalent of {@link net.minecraftforge.event.world.ChunkEvent}.
31 | */
32 | public class CubeEvent extends WorldEvent {
33 | private final ICube chunk;
34 |
35 | public CubeEvent(ICube cube) {
36 | super(cube.getWorld());
37 | this.chunk = cube;
38 | }
39 |
40 | public ICube getCube() {
41 | return chunk;
42 | }
43 |
44 | /**
45 | * CubicChunks equivalent of {@link net.minecraftforge.event.world.ChunkEvent.Load}.
46 | */
47 | public static class Load extends CubeEvent {
48 | public Load(ICube cube) {
49 | super(cube);
50 | }
51 | }
52 |
53 | /**
54 | * CubicChunks equivalent of {@link net.minecraftforge.event.world.ChunkEvent.Unload}.
55 | */
56 | public static class Unload extends CubeEvent {
57 | public Unload(ICube cube) {
58 | super(cube);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/ICubeProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.CubePos;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.world.chunk.Chunk;
30 |
31 | import javax.annotation.Nullable;
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | public interface ICubeProvider {
37 |
38 | @Nullable
39 | ICube getLoadedCube(int cubeX, int cubeY, int cubeZ);
40 |
41 | @Nullable
42 | ICube getLoadedCube(CubePos coords);
43 |
44 | ICube getCube(int cubeX, int cubeY, int cubeZ);
45 |
46 | ICube getCube(CubePos coords);
47 |
48 | /**
49 | * Retrieve a column, if it exists and is loaded
50 | *
51 | * @param x The x position of the column
52 | * @param z The z position of the column
53 | *
54 | * @return The column, if loaded. Null, otherwise.
55 | */
56 | // TODO remove, use vanilla methods
57 | @Nullable
58 | Chunk getLoadedColumn(int x, int z); // more strictly define the return type
59 |
60 | Chunk provideColumn(int x, int z); // more strictly define the return type
61 | }
62 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/ICubeWatcher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.XYZAddressable;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
30 |
31 | import javax.annotation.Nullable;
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | public interface ICubeWatcher extends XYZAddressable {
37 |
38 | boolean isSentToPlayers();
39 |
40 | @Nullable ICube getCube();
41 |
42 | void sendPacketToAllPlayers(IMessage packet);
43 |
44 | @Override int getX();
45 |
46 | @Override int getY();
47 |
48 | @Override int getZ();
49 |
50 | boolean shouldTick();
51 | }
52 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/ICubicTicket.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import it.unimi.dsi.fastutil.ints.IntSet;
28 | import net.minecraft.util.math.ChunkPos;
29 |
30 | import java.util.Map;
31 |
32 | /**
33 | * A CubicChunks chunkloading ticket. It's a cubic chunks ticket when the ticket's world is a cubic chunks world.
34 | * This interface is implemented by {@link net.minecraftforge.common.ForgeChunkManager.Ticket}.
35 | *
36 | * Use {@link ICubicWorldServer} methods to force load/unload cubes.
37 | */
38 | public interface ICubicTicket {
39 | /**
40 | * Returns an unmodifiable view of all forced cubes, in the form of map from column position,
41 | * to set of cube Y positions in that column. An implementation is allowed to return a copy
42 | * instead of a live view.
43 | *
44 | * @return unmodifiable view of forced cubes grouped by column position
45 | */
46 | Map getAllForcedChunkCubes();
47 | }
48 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/ICubicWorldType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.IntRange;
28 | import io.github.opencubicchunks.cubicchunks.api.worldgen.ICubeGenerator;
29 | import mcp.MethodsReturnNonnullByDefault;
30 | import net.minecraft.world.World;
31 | import net.minecraft.world.WorldServer;
32 |
33 | import javax.annotation.Nullable;
34 | import javax.annotation.ParametersAreNonnullByDefault;
35 |
36 | @ParametersAreNonnullByDefault
37 | @MethodsReturnNonnullByDefault
38 | public interface ICubicWorldType {
39 |
40 | // TODO: Make it Nonnull. VanillaCubic uses null
41 | @Nullable ICubeGenerator createCubeGenerator(World world);
42 |
43 | IntRange calculateGenerationHeightRange(WorldServer world);
44 |
45 | boolean hasCubicGeneratorForWorld(World object);
46 | }
47 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/world/IMinMaxHeight.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.world;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 |
29 | import javax.annotation.ParametersAreNonnullByDefault;
30 |
31 | @ParametersAreNonnullByDefault
32 | @MethodsReturnNonnullByDefault
33 | public interface IMinMaxHeight {
34 | /**
35 | * Returns Y position of the bottom block in the world
36 | *
37 | * @return the bottom of the world
38 | */
39 | default int getMinHeight() {
40 | return 0;
41 | }
42 |
43 | /**
44 | * Returns Y position of block above the top block in the world,
45 | *
46 | * @return the top of the world
47 | */
48 | default int getMaxHeight() {
49 | return 256;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/worldgen/populator/event/CubeGeneratorEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.worldgen.populator.event;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.worldgen.ICubeGenerator;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraftforge.fml.common.eventhandler.Event;
30 |
31 | import javax.annotation.ParametersAreNonnullByDefault;
32 |
33 | @ParametersAreNonnullByDefault
34 | @MethodsReturnNonnullByDefault
35 | public class CubeGeneratorEvent extends Event {
36 |
37 | private final ICubeGenerator gen;
38 |
39 | public CubeGeneratorEvent(ICubeGenerator gen) {
40 | this.gen = gen;
41 | }
42 |
43 | public ICubeGenerator getGenerator() {
44 | return this.gen;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/CubicChunksAPI/src/main/java/io/github/opencubicchunks/cubicchunks/api/worldgen/structure/feature/ICubicFeatureGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.api.worldgen.structure.feature;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.CubePos;
28 | import io.github.opencubicchunks.cubicchunks.api.worldgen.CubePrimer;
29 | import io.github.opencubicchunks.cubicchunks.api.worldgen.structure.ICubicStructureGenerator;
30 | import net.minecraft.util.math.BlockPos;
31 | import net.minecraft.world.World;
32 |
33 | import java.util.Random;
34 |
35 | import javax.annotation.Nullable;
36 |
37 | public interface ICubicFeatureGenerator extends ICubicStructureGenerator {
38 |
39 | String getStructureName();
40 |
41 | @Override void generate(World world, @Nullable CubePrimer cube, CubePos cubePos);
42 |
43 | boolean generateStructure(World world, Random rand, CubePos cubePos);
44 |
45 | boolean isInsideStructure(World world, BlockPos pos);
46 |
47 | boolean isPositionInStructure(World world, BlockPos pos);
48 |
49 | @Nullable BlockPos getNearestStructurePos(World worldIn, BlockPos pos, boolean findUnexplored);
50 | }
51 |
--------------------------------------------------------------------------------
/HEADER.txt:
--------------------------------------------------------------------------------
1 | This file is part of ${project}, licensed under the MIT License (MIT).
2 |
3 | Copyright (c) ${year} OpenCubicChunks
4 | Copyright (c) ${year} contributors
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | String getDiscordMessage() {
2 | def msg = "**Status:** " + currentBuild.currentResult.toLowerCase() + "\n**Branch:** ${BRANCH_NAME}\n**Changes:**"
3 | if (!currentBuild.changeSets.isEmpty()) {
4 | currentBuild.changeSets.first().getLogs().any {
5 | def line = "\n- `" + it.getCommitId().substring(0, 8) + "` *" + it.getComment().split("\n")[0].replaceAll('(? getLoadedChunks();
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/client/IContainerLocalRenderInformation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client;
26 |
27 | import net.minecraft.client.renderer.chunk.RenderChunk;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.gen.Accessor;
30 |
31 | @Mixin(targets = "net.minecraft.client.renderer.RenderGlobal$ContainerLocalRenderInformation")
32 | public interface IContainerLocalRenderInformation {
33 | @Accessor RenderChunk getRenderChunk();
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/client/IGuiCreateWorld.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client;
26 |
27 | import net.minecraft.client.gui.GuiCreateWorld;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.gen.Accessor;
30 |
31 | @Mixin(GuiCreateWorld.class)
32 | public interface IGuiCreateWorld {
33 | @Accessor int getSelectedIndex();
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/client/IGuiOptionsRowList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client;
26 |
27 | import net.minecraft.client.gui.GuiOptionsRowList;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.gen.Accessor;
30 |
31 | import java.util.List;
32 |
33 | @Mixin(GuiOptionsRowList.class)
34 | public interface IGuiOptionsRowList {
35 | @Accessor List getOptions();
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/client/IGuiScreen.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client;
26 |
27 | import net.minecraft.client.gui.GuiButton;
28 | import net.minecraft.client.gui.GuiScreen;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | import java.util.List;
33 |
34 | @Mixin(GuiScreen.class)
35 | public interface IGuiScreen {
36 | @Accessor List getButtonList();
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/client/INetHandlerPlayClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client;
26 |
27 | import net.minecraft.client.multiplayer.WorldClient;
28 | import net.minecraft.client.network.NetHandlerPlayClient;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(NetHandlerPlayClient.class)
33 | public interface INetHandlerPlayClient {
34 | @Accessor WorldClient getWorld();
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/client/IViewFrustum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client;
26 |
27 | import net.minecraft.client.renderer.ViewFrustum;
28 | import net.minecraft.client.renderer.chunk.RenderChunk;
29 | import net.minecraft.util.math.BlockPos;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.gen.Invoker;
32 |
33 | @Mixin(ViewFrustum.class)
34 | public interface IViewFrustum {
35 | @Invoker("getRenderChunk") RenderChunk getRenderChunkAt(BlockPos pos);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/IBlockStateContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import net.minecraft.util.BitArray;
28 | import net.minecraft.world.chunk.BlockStateContainer;
29 | import net.minecraft.world.chunk.IBlockStatePalette;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.gen.Accessor;
32 |
33 | @Mixin(BlockStateContainer.class)
34 | public interface IBlockStateContainer {
35 |
36 | @Accessor BitArray getStorage();
37 | @Accessor IBlockStatePalette getPalette();
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/IForgeChunkManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import com.google.common.collect.Multimap;
28 | import com.google.common.collect.SetMultimap;
29 | import net.minecraft.world.World;
30 | import net.minecraftforge.common.ForgeChunkManager;
31 | import org.spongepowered.asm.mixin.Mixin;
32 | import org.spongepowered.asm.mixin.gen.Accessor;
33 |
34 | import java.util.Map;
35 |
36 | @Mixin(value = ForgeChunkManager.class, remap = false)
37 | public interface IForgeChunkManager {
38 | @Accessor static Map> getTickets() {
39 | throw new Error("IForgeChunkManager failed to apply");
40 | }
41 |
42 | @Accessor static SetMultimap getPlayerTickets() {
43 | throw new Error("IForgeChunkManager failed to apply");
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/IGameRegistry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import net.minecraftforge.fml.common.IWorldGenerator;
28 | import net.minecraftforge.fml.common.registry.GameRegistry;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 | import org.spongepowered.asm.mixin.gen.Invoker;
32 |
33 | import java.util.List;
34 |
35 | import javax.annotation.Nullable;
36 |
37 | @Mixin(value = GameRegistry.class, remap = false)
38 | public interface IGameRegistry {
39 | @Nullable @Accessor static List getSortedGeneratorList() {
40 | throw new Error("IGameRegistry failed to apply");
41 | }
42 | @Invoker("computeSortedGeneratorList") static void computeGenerators() {
43 | throw new Error("IGameRegistry failed to apply");
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/IIntegratedServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import net.minecraft.server.integrated.IntegratedServer;
28 | import net.minecraft.world.WorldSettings;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(IntegratedServer.class)
33 | public interface IIntegratedServer {
34 | @Accessor WorldSettings getWorldSettings();
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/IPlayerChunkMapEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import net.minecraft.entity.player.EntityPlayerMP;
28 | import net.minecraft.server.management.PlayerChunkMapEntry;
29 | import net.minecraft.util.math.ChunkPos;
30 | import net.minecraft.world.chunk.Chunk;
31 |
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.gen.Accessor;
34 |
35 | import java.util.List;
36 |
37 | @Mixin(PlayerChunkMapEntry.class)
38 | public interface IPlayerChunkMapEntry {
39 | @Accessor("players") List getPlayerList();
40 | @Accessor void setLastUpdateInhabitedTime(long time);
41 | @Accessor void setSentToPlayers(boolean value);
42 | @Accessor(remap = false) boolean isLoading();
43 | @Accessor(remap = false) Runnable getLoadedRunnable();
44 | @Accessor Chunk getChunk();
45 | @Accessor void setChunk(Chunk chunk);
46 | @Accessor ChunkPos getPos();
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/MixinDerivedWorldInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.asm.mixin.ICubicWorldSettings;
28 | import net.minecraft.world.storage.DerivedWorldInfo;
29 | import net.minecraft.world.storage.WorldInfo;
30 | import org.spongepowered.asm.mixin.Final;
31 | import org.spongepowered.asm.mixin.Mixin;
32 | import org.spongepowered.asm.mixin.Shadow;
33 |
34 | @Mixin(DerivedWorldInfo.class)
35 | public class MixinDerivedWorldInfo extends MixinWorldInfo {
36 |
37 | @Shadow @Final private WorldInfo delegate;
38 |
39 | @Override public boolean isCubic() {
40 | return ((ICubicWorldSettings) delegate).isCubic();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/MixinEntity_DeathFix.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.entity.Entity;
30 | import net.minecraft.world.World;
31 | import org.spongepowered.asm.mixin.Mixin;
32 | import org.spongepowered.asm.mixin.Shadow;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import javax.annotation.ParametersAreNonnullByDefault;
37 |
38 | @MethodsReturnNonnullByDefault
39 | @ParametersAreNonnullByDefault
40 | @Mixin(Entity.class)
41 | public class MixinEntity_DeathFix {
42 |
43 | @Shadow public World world;
44 |
45 | /**
46 | * Replace -64 constant, to avoid killing entities below y=-64
47 | */
48 | @ModifyConstant(method = "onEntityUpdate", constant = @Constant(doubleValue = -64.0D), require = 1)
49 | private double getDeathY(double originalY) {
50 | return ((ICubicWorld) world).getMinHeight() + originalY;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/MixinIBlockAccess_MinMaxHeight.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.IMinMaxHeight;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.world.IBlockAccess;
30 | import org.spongepowered.asm.mixin.Mixin;
31 |
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | @Mixin(IBlockAccess.class)
37 | public interface MixinIBlockAccess_MinMaxHeight extends IMinMaxHeight {}
38 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/MixinRegionFileCache.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common;
26 |
27 | import cubicchunks.regionlib.lib.provider.SharedCachedRegionProvider;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.world.chunk.storage.RegionFileCache;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.injection.At;
32 | import org.spongepowered.asm.mixin.injection.Inject;
33 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
34 |
35 | import java.io.IOException;
36 |
37 | import javax.annotation.ParametersAreNonnullByDefault;
38 |
39 | // a hook for flush()
40 | // many mods already assume AnvilSaveHandler is always used, so we assume the same and hope for the best
41 | @ParametersAreNonnullByDefault
42 | @MethodsReturnNonnullByDefault
43 | @Mixin(RegionFileCache.class)
44 | public class MixinRegionFileCache {
45 |
46 | @Inject(method = "clearRegionFileReferences", at = @At("HEAD"))
47 | private static void onClearRefs(CallbackInfo cbi) throws IOException {
48 | SharedCachedRegionProvider.clearRegions();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ICPacketPlayer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.client.CPacketPlayer;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.gen.Accessor;
30 |
31 | @Mixin(CPacketPlayer.class)
32 | public interface ICPacketPlayer {
33 | @Accessor("x") void setX(double x);
34 | @Accessor("x") double getX();
35 | @Accessor("y") void setY(double y);
36 | @Accessor("y") double getY();
37 | @Accessor("z") void setZ(double z);
38 | @Accessor("z") double getZ();
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ICPacketPlayerDigging.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.client.CPacketPlayerDigging;
28 | import net.minecraft.util.math.BlockPos;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(CPacketPlayerDigging.class)
33 | public interface ICPacketPlayerDigging {
34 | @Accessor void setPosition(BlockPos pos);
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ICPacketPlayerTryUseItemOnBlock.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock;
28 | import net.minecraft.util.math.BlockPos;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(CPacketPlayerTryUseItemOnBlock.class)
33 | public interface ICPacketPlayerTryUseItemOnBlock {
34 |
35 | @Accessor void setPosition(BlockPos pos);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ICPacketTabComplete.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.client.CPacketTabComplete;
28 | import net.minecraft.util.math.BlockPos;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(CPacketTabComplete.class)
33 | public interface ICPacketTabComplete {
34 |
35 | @Accessor void setTargetBlock(BlockPos pos);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ICPacketUpdateSign.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.client.CPacketUpdateSign;
28 | import net.minecraft.util.math.BlockPos;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(CPacketUpdateSign.class)
33 | public interface ICPacketUpdateSign {
34 |
35 | @Accessor void setPos(BlockPos pos);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ICPacketVehicleMove.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.client.CPacketVehicleMove;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.gen.Accessor;
30 |
31 | @Mixin(CPacketVehicleMove.class)
32 | public interface ICPacketVehicleMove {
33 | @Accessor("x") void setX(double x);
34 | @Accessor("y") void setY(double y);
35 | @Accessor("z") void setZ(double z);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ISPacketChunkData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.nbt.NBTTagCompound;
28 | import net.minecraft.network.play.server.SPacketChunkData;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | import java.util.List;
33 |
34 | @Mixin(SPacketChunkData.class)
35 | public interface ISPacketChunkData {
36 | @Accessor void setChunkX(int x);
37 | @Accessor void setChunkZ(int z);
38 | @Accessor void setAvailableSections(int sections);
39 | @Accessor void setBuffer(byte[] buf);
40 | @Accessor void setTileEntityTags(List teTags);
41 | @Accessor void setFullChunk(boolean full);
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/common/vanillaclient/ISPacketMultiBlockChange.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.vanillaclient;
26 |
27 | import net.minecraft.network.play.server.SPacketMultiBlockChange;
28 | import net.minecraft.util.math.ChunkPos;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(SPacketMultiBlockChange.class)
33 | public interface ISPacketMultiBlockChange {
34 | @Accessor void setChunkPos(ChunkPos pos);
35 | @Accessor void setChangedBlocks(SPacketMultiBlockChange.BlockUpdateData[] data);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/server/MixinDedicatedPlayerList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.server;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.MixinPlayerList;
28 | import net.minecraft.server.dedicated.DedicatedPlayerList;
29 | import net.minecraft.server.dedicated.DedicatedServer;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.injection.At;
32 | import org.spongepowered.asm.mixin.injection.Inject;
33 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
34 |
35 | @Mixin(DedicatedPlayerList.class)
36 | public class MixinDedicatedPlayerList extends MixinPlayerList {
37 |
38 | @Inject(method = "", at = @At(value = "RETURN"))
39 | private void setVerticalViewDistance(DedicatedServer server, CallbackInfo cbi) {
40 | this.setVerticalViewDistance(server.getIntProperty("vertical-view-distance", -1));
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/core/server/MixinDedicatedServer_HeightLimits.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.server;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.CubicChunks;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.server.dedicated.DedicatedServer;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.injection.Constant;
32 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
33 |
34 | import javax.annotation.ParametersAreNonnullByDefault;
35 |
36 | /**
37 | * Fix height limits in {@code DedicatedServer}
38 | */
39 | @MethodsReturnNonnullByDefault
40 | @ParametersAreNonnullByDefault
41 | @Mixin(DedicatedServer.class)
42 | public class MixinDedicatedServer_HeightLimits {
43 |
44 | /**
45 | * Replace the default build height (256).
46 | */
47 | @ModifyConstant(method = "init", constant = @Constant(intValue = 256), require = 2)
48 | private int getDefaultBuildHeight(int oldValue) {
49 | return CubicChunks.MAX_SUPPORTED_BLOCK_Y + 1;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/client/isblockloaded/MixinEntity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.client.isblockloaded;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.entity.Entity;
29 | import net.minecraft.util.math.MathHelper;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.Shadow;
32 | import org.spongepowered.asm.mixin.injection.At;
33 | import org.spongepowered.asm.mixin.injection.ModifyArg;
34 |
35 | import javax.annotation.ParametersAreNonnullByDefault;
36 |
37 | @ParametersAreNonnullByDefault
38 | @MethodsReturnNonnullByDefault
39 | @Mixin(Entity.class)
40 | public abstract class MixinEntity {
41 |
42 | @Shadow
43 | public double posY;
44 |
45 | @Shadow public abstract float getEyeHeight();
46 |
47 | @ModifyArg(method = "getBrightnessForRender", index = 1, at = @At(target = "Lnet/minecraft/util/math/BlockPos$MutableBlockPos;(III)V", value = "INVOKE"))
48 | public int getModifiedYPos_getBrightnessForRender(int y) {
49 | return MathHelper.floor(this.posY + this.getEyeHeight());
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/EntityBat_AiHeightLimit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.entity.passive.EntityAmbientCreature;
30 | import net.minecraft.entity.passive.EntityBat;
31 | import net.minecraft.world.World;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import javax.annotation.ParametersAreNonnullByDefault;
37 |
38 | @ParametersAreNonnullByDefault
39 | @MethodsReturnNonnullByDefault
40 | @Mixin(EntityBat.class)
41 | public class EntityBat_AiHeightLimit extends EntityAmbientCreature {
42 |
43 | public EntityBat_AiHeightLimit(World worldIn) {
44 | super(worldIn);
45 | }
46 |
47 | @ModifyConstant(method = "updateAITasks", constant = @Constant(intValue = 1, ordinal = 0))
48 | private int updateAITasks_getMinSpawnPositionY(int originalY) {
49 | return ((ICubicWorld) this.world).getMinHeight() + originalY;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/MixinBlockChorusFlower.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import net.minecraft.block.BlockChorusFlower;
29 | import net.minecraft.block.state.IBlockState;
30 | import net.minecraft.util.math.BlockPos;
31 | import net.minecraft.world.World;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import java.util.Random;
37 |
38 |
39 | @Mixin(BlockChorusFlower.class)
40 | public class MixinBlockChorusFlower {
41 |
42 | /**
43 | * @author Babbaj
44 | * @reason Fix hardcoded height check preventing chorus flower from growing above Y=256
45 | */
46 | @ModifyConstant(method = "updateTick",
47 | constant = @Constant(intValue = 256))
48 | private int updateTick(int maxY, World worldIn, BlockPos pos, IBlockState state, Random rand) {
49 | return ((ICubicWorld) worldIn).getMaxHeight();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/MixinBlockMushroom.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import net.minecraft.block.BlockMushroom;
29 | import net.minecraft.block.state.IBlockState;
30 | import net.minecraft.util.math.BlockPos;
31 | import net.minecraft.world.World;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | @Mixin(BlockMushroom.class)
37 | public class MixinBlockMushroom {
38 |
39 | @ModifyConstant(method = "canBlockStay",
40 | constant = @Constant(expandZeroConditions = Constant.Condition.GREATER_THAN_OR_EQUAL_TO_ZERO))
41 | private int getMinHeight(int zero, World worldIn, BlockPos pos, IBlockState state) {
42 | return ((ICubicWorld) worldIn).getMinHeight();
43 | }
44 |
45 | @ModifyConstant(method = "canBlockStay",
46 | constant = @Constant(intValue = 256))
47 | private int getMaxHeight(int _256, World worldIn, BlockPos pos, IBlockState state) {
48 | return ((ICubicWorld) worldIn).getMaxHeight();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/MixinBlockPortal_Size_HeightLimits.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import javax.annotation.ParametersAreNonnullByDefault;
28 |
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
31 | import org.spongepowered.asm.mixin.injection.Constant;
32 |
33 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
34 | import mcp.MethodsReturnNonnullByDefault;
35 | import net.minecraft.block.BlockPortal;
36 | import net.minecraft.util.EnumFacing;
37 | import net.minecraft.util.math.BlockPos;
38 | import net.minecraft.world.World;
39 |
40 | @MethodsReturnNonnullByDefault
41 | @ParametersAreNonnullByDefault
42 | @Mixin(BlockPortal.Size.class)
43 | public abstract class MixinBlockPortal_Size_HeightLimits {
44 |
45 | @ModifyConstant(method = "", constant = @Constant(intValue = 0, ordinal = 0, expandZeroConditions = Constant.Condition.GREATER_THAN_ZERO), require = 1)
46 | private int portalSizeClassInitReplace0(int posY, World worldIn, BlockPos origin, EnumFacing.Axis axis) {
47 | return ((ICubicWorld)worldIn).getMinHeight();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/MixinBlockSkull_WitherSpawnLimits.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.block.BlockSkull;
30 | import net.minecraft.tileentity.TileEntitySkull;
31 | import net.minecraft.util.math.BlockPos;
32 | import net.minecraft.world.World;
33 | import org.spongepowered.asm.mixin.Mixin;
34 | import org.spongepowered.asm.mixin.injection.Constant;
35 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
36 |
37 | import javax.annotation.ParametersAreNonnullByDefault;
38 |
39 | @ParametersAreNonnullByDefault
40 | @MethodsReturnNonnullByDefault
41 | @Mixin(BlockSkull.class)
42 | public class MixinBlockSkull_WitherSpawnLimits {
43 |
44 | @ModifyConstant(method = "checkWitherSpawn", constant = @Constant(intValue = 2, ordinal = 0))
45 | private int checkWitherSpawnHeightLimit(int originalHeight, World worldIn, BlockPos pos, TileEntitySkull te) {
46 | return ((ICubicWorld) worldIn).getMinHeight() + originalHeight;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/MixinEntityBoat.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import javax.annotation.ParametersAreNonnullByDefault;
28 |
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.injection.Constant;
31 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
32 |
33 | import mcp.MethodsReturnNonnullByDefault;
34 | import net.minecraft.entity.Entity;
35 | import net.minecraft.entity.item.EntityBoat;
36 | import net.minecraft.world.World;
37 |
38 | @ParametersAreNonnullByDefault
39 | @MethodsReturnNonnullByDefault
40 | @Mixin(EntityBoat.class)
41 | public abstract class MixinEntityBoat extends Entity {
42 |
43 | public MixinEntityBoat(World worldIn) {
44 | super(worldIn);
45 | }
46 |
47 | @ModifyConstant(method = "checkInWater", constant = @Constant(doubleValue = Double.MIN_VALUE))
48 | private double waterLevelMinValue(double orig) {
49 | return Double.NEGATIVE_INFINITY;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/MixinNetHandlerPlayServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common;
26 |
27 | import net.minecraft.network.NetHandlerPlayServer;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.injection.At;
30 | import org.spongepowered.asm.mixin.injection.Constant;
31 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
32 | import org.spongepowered.asm.mixin.injection.Slice;
33 |
34 | @Mixin(NetHandlerPlayServer.class)
35 | public class MixinNetHandlerPlayServer {
36 |
37 | @ModifyConstant(method = "isMovePlayerPacketInvalid",
38 | slice = @Slice(
39 | from = @At(value = "INVOKE:LAST", target = "Lnet/minecraft/network/play/client/CPacketPlayer;getY(D)D"),
40 | to = @At(value = "INVOKE:LAST", target = "Lnet/minecraft/network/play/client/CPacketPlayer;getZ(D)D")
41 | ),
42 | constant = @Constant(doubleValue = 3.0E7D),
43 | require = 0
44 | )
45 | private static double getMaxY(double old) {
46 | return Integer.MAX_VALUE - 4096;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/fakeheight/IASMEventHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.fakeheight;
26 |
27 | import net.minecraftforge.fml.common.ModContainer;
28 | import net.minecraftforge.fml.common.eventhandler.ASMEventHandler;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(ASMEventHandler.class)
33 | public interface IASMEventHandler {
34 | @Accessor(remap = false) ModContainer getOwner();
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/fakeheight/IEventBus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.fakeheight;
26 |
27 | import net.minecraftforge.fml.common.eventhandler.EventBus;
28 | import net.minecraftforge.fml.common.eventhandler.IEventExceptionHandler;
29 | import org.spongepowered.asm.mixin.Mixin;
30 | import org.spongepowered.asm.mixin.gen.Accessor;
31 |
32 | @Mixin(EventBus.class)
33 | public interface IEventBus {
34 |
35 | @Accessor(remap = false) boolean isShutdown();
36 | @Accessor(remap = false) int getBusID();
37 | @Accessor(remap = false) IEventExceptionHandler getExceptionHandler();
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/isblockloaded/MixinEntity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.isblockloaded;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.entity.Entity;
29 | import net.minecraft.util.math.MathHelper;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.Shadow;
32 | import org.spongepowered.asm.mixin.injection.At;
33 | import org.spongepowered.asm.mixin.injection.ModifyArg;
34 |
35 | import javax.annotation.ParametersAreNonnullByDefault;
36 |
37 | @ParametersAreNonnullByDefault
38 | @MethodsReturnNonnullByDefault
39 | @Mixin(Entity.class)
40 | public abstract class MixinEntity {
41 |
42 | @Shadow public double posY;
43 |
44 | @Shadow public abstract float getEyeHeight();
45 |
46 | @ModifyArg(method = "getBrightness", index = 1, at = @At(target = "Lnet/minecraft/util/math/BlockPos$MutableBlockPos;(III)V", value = "INVOKE"))
47 | public int getModifiedYPos_getBrightness(int y) {
48 | return MathHelper.floor(this.posY + this.getEyeHeight());
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/vanillaclient/INetHandlerPlayServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.vanillaclient;
26 |
27 | import net.minecraft.network.NetHandlerPlayServer;
28 | import org.spongepowered.asm.mixin.Mixin;
29 | import org.spongepowered.asm.mixin.gen.Accessor;
30 |
31 | @Mixin(NetHandlerPlayServer.class)
32 | public interface INetHandlerPlayServer {
33 | @Accessor int getTeleportId();
34 | @Accessor void setTeleportId(int id);
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenBonusChest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.world.gen.feature.WorldGeneratorBonusChest;
29 | import org.spongepowered.asm.mixin.Mixin;
30 |
31 | import javax.annotation.ParametersAreNonnullByDefault;
32 |
33 | @ParametersAreNonnullByDefault
34 | @MethodsReturnNonnullByDefault
35 | @Mixin(WorldGeneratorBonusChest.class)
36 | public class MixinWorldGenBonusChest {
37 | // TODO: bonus chest
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenDoublePlants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.util.math.BlockPos;
30 | import net.minecraft.world.World;
31 | import net.minecraft.world.gen.feature.WorldGenDoublePlant;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import java.util.Random;
37 |
38 | import javax.annotation.ParametersAreNonnullByDefault;
39 |
40 | @ParametersAreNonnullByDefault
41 | @MethodsReturnNonnullByDefault
42 | @Mixin(WorldGenDoublePlant.class)
43 | public class MixinWorldGenDoublePlants {
44 |
45 | @ModifyConstant(method = "generate", constant = @Constant(intValue = 254))
46 | private int getMaxGenHeight(int orig, World worldIn, Random rand, BlockPos position) {
47 | return ((ICubicWorld) worldIn).getMaxHeight() - 2;
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenDungeons.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.util.math.BlockPos;
30 | import net.minecraft.world.World;
31 | import net.minecraft.world.gen.feature.WorldGenDungeons;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import java.util.Random;
37 |
38 | import javax.annotation.ParametersAreNonnullByDefault;
39 |
40 | @ParametersAreNonnullByDefault
41 | @MethodsReturnNonnullByDefault
42 | @Mixin(WorldGenDungeons.class)
43 | public class MixinWorldGenDungeons {
44 |
45 | @ModifyConstant(method = "generate", constant = @Constant(
46 | intValue = 0,
47 | expandZeroConditions = Constant.Condition.GREATER_THAN_OR_EQUAL_TO_ZERO,
48 | ordinal = 3))
49 | private int getMinHeight(int orig, World worldIn, Random rand, BlockPos position) {
50 | return ((ICubicWorld) worldIn).getMinHeight();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenFlowers.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.util.math.BlockPos;
30 | import net.minecraft.world.World;
31 | import net.minecraft.world.gen.feature.WorldGenFlowers;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import java.util.Random;
37 |
38 | import javax.annotation.ParametersAreNonnullByDefault;
39 |
40 | @ParametersAreNonnullByDefault
41 | @MethodsReturnNonnullByDefault
42 | @Mixin(WorldGenFlowers.class)
43 | public class MixinWorldGenFlowers {
44 |
45 | @ModifyConstant(method = "generate", constant = @Constant(intValue = 255))
46 | private int getMinHeight(int orig, World worldIn, Random rand, BlockPos position) {
47 | return ((ICubicWorld) worldIn).getMaxHeight() - 1;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenFossils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.world.gen.feature.WorldGenFossils;
29 | import org.spongepowered.asm.mixin.Mixin;
30 |
31 | import javax.annotation.ParametersAreNonnullByDefault;
32 |
33 | // that one may be hard but I also see some interesting possibilities with that
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | @Mixin(WorldGenFossils.class)
37 | public class MixinWorldGenFossils {
38 | // TODO: Fossils (add with retrogen)
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenSpikes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.world.gen.feature.WorldGenSpikes;
29 | import org.spongepowered.asm.mixin.Mixin;
30 |
31 | import javax.annotation.ParametersAreNonnullByDefault;
32 |
33 | @ParametersAreNonnullByDefault
34 | @MethodsReturnNonnullByDefault
35 | @Mixin(WorldGenSpikes.class)
36 | public class MixinWorldGenSpikes {
37 | // TODO: End Spikes
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/MixinWorldGenVines.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.world.gen.feature.WorldGenVines;
29 | import org.spongepowered.asm.mixin.Mixin;
30 |
31 | import javax.annotation.ParametersAreNonnullByDefault;
32 |
33 | @ParametersAreNonnullByDefault
34 | @MethodsReturnNonnullByDefault
35 | @Mixin(WorldGenVines.class)
36 | public class MixinWorldGenVines {
37 | // this class is broken right now, so leave it being broken and don't touch it
38 | // this mixin class stays there empty until Mojang removes or fixes it
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/common/worldgen/tree/MixinWorldGenShrub.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes.common.worldgen.tree;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.Coords;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.util.math.BlockPos;
30 | import net.minecraft.world.World;
31 | import net.minecraft.world.gen.feature.WorldGenShrub;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | import java.util.Random;
37 |
38 | import javax.annotation.ParametersAreNonnullByDefault;
39 |
40 | @ParametersAreNonnullByDefault
41 | @MethodsReturnNonnullByDefault
42 | @Mixin(WorldGenShrub.class)
43 | public class MixinWorldGenShrub {
44 |
45 | @ModifyConstant(method = "generate", constant = @Constant(
46 | intValue = 0,
47 | expandZeroConditions = Constant.Condition.GREATER_THAN_ZERO,
48 | ordinal = 0))
49 | private int getMinScanHeight(int orig, World worldIn, Random rand, BlockPos position) {
50 | return Coords.getMinCubePopulationPos(position.getY());
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/fixes/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Contains mixins that are not strictly critical for the mod to work in most cases,
3 | * but not applying them is likely to break normal gameplay.
4 | */
5 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.fixes;
6 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/noncritical/common/MixinTileEntityBeacon.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.noncritical.common;
26 |
27 | import org.spongepowered.asm.mixin.Mixin;
28 | import org.spongepowered.asm.mixin.injection.Constant;
29 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
30 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
31 | import net.minecraft.tileentity.TileEntityBeacon;
32 | import net.minecraft.tileentity.TileEntityLockable;
33 |
34 | @Mixin(TileEntityBeacon.class)
35 | public abstract class MixinTileEntityBeacon extends TileEntityLockable {
36 |
37 | @ModifyConstant(method = "updateSegmentColors", constant = @Constant(expandZeroConditions = Constant.Condition.LESS_THAN_ZERO))
38 | private int updateSegmentColorsYValue(int orig) {
39 | return ((ICubicWorld) world).getMinHeight();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/noncritical/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Mixins that are not required for the mod to work, mostly low priority bugfixes.
3 | */
4 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.noncritical;
5 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/selectable/client/IGuiVideoSettings.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.selectable.client;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.client.IGuiScreen;
28 | import net.minecraft.client.gui.GuiListExtended;
29 | import net.minecraft.client.gui.GuiVideoSettings;
30 | import org.spongepowered.asm.mixin.Mixin;
31 | import org.spongepowered.asm.mixin.gen.Accessor;
32 |
33 | @Mixin(GuiVideoSettings.class)
34 | public interface IGuiVideoSettings extends IGuiScreen {
35 | @Accessor GuiListExtended getOptionsRowList();
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/selectable/client/optifine/MixinExtendedBlockStorage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.selectable.client.optifine;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.asm.optifine.IOptifineExtendedBlockStorage;
28 | import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
29 | import org.spongepowered.asm.mixin.Mixin;
30 |
31 | @Mixin(ExtendedBlockStorage.class)
32 | public abstract class MixinExtendedBlockStorage implements IOptifineExtendedBlockStorage {
33 | // method implemented by OptiFine
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/selectable/client/optifine/MixinRenderGlobalOptifine_E.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.selectable.client.optifine;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.IMinMaxHeight;
28 | import net.minecraft.client.multiplayer.WorldClient;
29 | import net.minecraft.client.renderer.RenderGlobal;
30 | import org.spongepowered.asm.mixin.Dynamic;
31 | import org.spongepowered.asm.mixin.Mixin;
32 | import org.spongepowered.asm.mixin.Shadow;
33 | import org.spongepowered.asm.mixin.injection.Constant;
34 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
35 |
36 | @Mixin(RenderGlobal.class)
37 | public class MixinRenderGlobalOptifine_E {
38 | @Shadow private WorldClient world;
39 |
40 | @Dynamic @ModifyConstant(method = "setupTerrain", constant = @Constant(intValue = 256))
41 | public int getMaxWorldHeight(int _256) {
42 | return ((IMinMaxHeight) world).getMaxHeight();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/selectable/client/optifine/MixinViewFrustum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.selectable.client.optifine;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.asm.optifine.ChunkPos3;
28 | import net.minecraft.client.renderer.ViewFrustum;
29 | import net.minecraft.client.renderer.chunk.RenderChunk;
30 | import net.minecraft.util.math.ChunkPos;
31 | import org.spongepowered.asm.mixin.Dynamic;
32 | import org.spongepowered.asm.mixin.Mixin;
33 | import org.spongepowered.asm.mixin.injection.At;
34 | import org.spongepowered.asm.mixin.injection.Redirect;
35 |
36 | @SuppressWarnings("target")
37 | @Mixin(ViewFrustum.class)
38 | public class MixinViewFrustum {
39 |
40 | @Dynamic @Redirect(method = "updateVboRegion(Lnet/minecraft/client/renderer/chunk/RenderChunk;)V",
41 | at = @At(value = "NEW", target = "net/minecraft/util/math/ChunkPos"))
42 | private ChunkPos getChunkPos(int x, int z, RenderChunk renderChunk) {
43 | return new ChunkPos3(x, renderChunk.getPosition().getY() & ~255, z);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/mixin/selectable/common/MixinTileEntityBeaconBetterFps.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.mixin.selectable.common;
26 |
27 | import org.spongepowered.asm.mixin.Mixin;
28 | import org.spongepowered.asm.mixin.injection.Constant;
29 | import org.spongepowered.asm.mixin.injection.ModifyConstant;
30 | import io.github.opencubicchunks.cubicchunks.api.world.ICubicWorld;
31 | import net.minecraft.tileentity.TileEntityBeacon;
32 | import net.minecraft.tileentity.TileEntityLockable;
33 |
34 | @SuppressWarnings("target")
35 | @Mixin(TileEntityBeacon.class)
36 | public abstract class MixinTileEntityBeaconBetterFps extends TileEntityLockable {
37 |
38 | @ModifyConstant(method = "updateLevels(III)V", constant = @Constant(expandZeroConditions = Constant.Condition.LESS_THAN_ZERO), remap = false)
39 | private int updateLevelsYValue(int orig) {
40 | return ((ICubicWorld) world).getMinHeight();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/optifine/IOptifineExtendedBlockStorage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.optifine;
26 |
27 | public interface IOptifineExtendedBlockStorage {
28 | int getBlockRefCount();
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/asm/optifine/IOptifineRenderChunk.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.asm.optifine;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICube;
28 |
29 | public interface IOptifineRenderChunk {
30 | ICube getCube();
31 |
32 | boolean isCubic();
33 |
34 | int getRegionX();
35 |
36 | int getRegionY();
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/block/state/FullBlockBlockStateContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.block.state;
26 |
27 | import javax.annotation.Nullable;
28 |
29 | import com.google.common.collect.ImmutableMap;
30 |
31 | import net.minecraft.block.Block;
32 | import net.minecraft.block.properties.IProperty;
33 | import net.minecraft.block.state.BlockStateContainer;
34 | import net.minecraft.block.state.IBlockState;
35 |
36 | import net.minecraft.block.state.BlockStateContainer.StateImplementation;
37 |
38 | public class FullBlockBlockStateContainer extends BlockStateContainer {
39 |
40 | public FullBlockBlockStateContainer(Block blockIn, IProperty>[] properties) {
41 | super(blockIn, properties);
42 | }
43 |
44 | protected StateImplementation createState(Block block, ImmutableMap, Comparable>> properties,
45 | @Nullable ImmutableMap, java.util.Optional>> unlistedProperties) {
46 | return new FullBlockStateImplementation(block, properties);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/block/state/NonCollidingBlockStateContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.block.state;
26 |
27 | import javax.annotation.Nullable;
28 |
29 | import com.google.common.collect.ImmutableMap;
30 |
31 | import net.minecraft.block.Block;
32 | import net.minecraft.block.properties.IProperty;
33 | import net.minecraft.block.state.BlockStateContainer;
34 | import net.minecraft.block.state.IBlockState;
35 |
36 | import net.minecraft.block.state.BlockStateContainer.StateImplementation;
37 |
38 | public class NonCollidingBlockStateContainer extends BlockStateContainer {
39 |
40 | public NonCollidingBlockStateContainer(Block blockIn, IProperty>[] properties) {
41 | super(blockIn, properties);
42 | }
43 |
44 | protected StateImplementation createState(Block block, ImmutableMap, Comparable>> properties,
45 | @Nullable ImmutableMap, java.util.Optional>> unlistedProperties) {
46 | return new NonCollidingBlockStateImplementation(block, properties);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/block/state/NonCollidingBlockStateImplementation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.block.state;
26 |
27 | import java.util.List;
28 |
29 | import javax.annotation.Nullable;
30 |
31 | import com.google.common.collect.ImmutableMap;
32 |
33 | import net.minecraft.block.Block;
34 | import net.minecraft.block.properties.IProperty;
35 | import net.minecraft.block.state.BlockStateContainer.StateImplementation;
36 | import net.minecraft.entity.Entity;
37 | import net.minecraft.util.math.AxisAlignedBB;
38 | import net.minecraft.util.math.BlockPos;
39 | import net.minecraft.world.World;
40 |
41 | public class NonCollidingBlockStateImplementation extends StateImplementation {
42 |
43 | public NonCollidingBlockStateImplementation(Block blockIn, ImmutableMap, Comparable>> propertiesIn) {
44 | super(blockIn, propertiesIn);
45 | }
46 |
47 | @Override
48 | public void addCollisionBoxToList(World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes,
49 | @Nullable Entity entityIn, boolean isActualState) {
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/entity/ICubicEntityTracker.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.entity;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.world.ICube;
28 | import net.minecraft.entity.player.EntityPlayerMP;
29 |
30 | public interface ICubicEntityTracker {
31 | void sendLeashedEntitiesInCube(EntityPlayerMP player, ICube cube);
32 |
33 | void setVertViewDistance(int viewDistance);
34 |
35 | interface Entry {
36 |
37 | void setMaxVertRange(int maxVertTrackingDistanceThreshold);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/lighting/phosphor/LightingEngineHelpers.java:
--------------------------------------------------------------------------------
1 | package io.github.opencubicchunks.cubicchunks.core.lighting.phosphor;
2 |
3 | import io.github.opencubicchunks.cubicchunks.api.world.ICube;
4 | import io.github.opencubicchunks.cubicchunks.core.asm.mixin.core.common.IBlockStateContainer;
5 | import net.minecraft.block.state.IBlockState;
6 | import net.minecraft.init.Blocks;
7 | import net.minecraft.util.math.BlockPos;
8 | import net.minecraft.world.chunk.Chunk;
9 | import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
10 |
11 | public class LightingEngineHelpers {
12 | private static final IBlockState DEFAULT_BLOCK_STATE = Blocks.AIR.getDefaultState();
13 |
14 | // Avoids some additional logic in Chunk#getBlockState... 0 is always air
15 | static IBlockState posToState(final BlockPos pos, final ICube chunk) {
16 | return posToState(pos, chunk.getStorage());
17 | }
18 |
19 | static IBlockState posToState(final BlockPos pos, final ExtendedBlockStorage section) {
20 | final int x = pos.getX();
21 | final int y = pos.getY();
22 | final int z = pos.getZ();
23 |
24 | if (section != Chunk.NULL_BLOCK_STORAGE) {
25 | IBlockStateContainer data = (IBlockStateContainer) section.getData();
26 | int i = data.getStorage().getAt((y & 15) << 8 | (z & 15) << 4 | x & 15);
27 |
28 | if (i != 0) {
29 | IBlockState state = data.getPalette().getBlockState(i);
30 | if (state != null) {
31 | return state;
32 | }
33 | }
34 | }
35 |
36 | return DEFAULT_BLOCK_STATE;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/network/AbstractClientMessageHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.network;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.entity.player.EntityPlayer;
29 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
30 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
31 |
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @MethodsReturnNonnullByDefault
35 | @ParametersAreNonnullByDefault
36 | public abstract class AbstractClientMessageHandler extends AbstractMessageHandler {
37 |
38 | // implementing a final version of the server message handler both prevents it from
39 | // appearing automatically and prevents us from ever accidentally overriding it
40 | public final void handleServerMessage(EntityPlayer player, T message, MessageContext ctx) {
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/network/AbstractServerMessageHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.network;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.entity.player.EntityPlayer;
29 | import net.minecraft.world.World;
30 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
31 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
32 |
33 | import javax.annotation.ParametersAreNonnullByDefault;
34 |
35 | @MethodsReturnNonnullByDefault
36 | @ParametersAreNonnullByDefault
37 | public abstract class AbstractServerMessageHandler extends AbstractMessageHandler {
38 |
39 | // implementing a final version of the client message handler both prevents it from
40 | // appearing automatically and prevents us from ever accidentally overriding it
41 | @Override public final void handleClientMessage(World world, EntityPlayer player, T message, MessageContext ctx) {
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/server/ICubicPlayerList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.server;
26 |
27 | public interface ICubicPlayerList {
28 | int getVerticalViewDistance();
29 |
30 | int getRawVerticalViewDistance();
31 |
32 | void setVerticalViewDistance(int dist);
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/server/WatcherPlayerEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.server;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 | import net.minecraft.entity.player.EntityPlayerMP;
29 |
30 | import javax.annotation.Nonnull;
31 | import javax.annotation.ParametersAreNonnullByDefault;
32 |
33 | @ParametersAreNonnullByDefault
34 | @MethodsReturnNonnullByDefault
35 | class WatcherPlayerEntry {
36 |
37 | @Nonnull EntityPlayerMP player;
38 |
39 | WatcherPlayerEntry(EntityPlayerMP player) {
40 | this.player = player;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/server/chunkio/async/forge/QueuedColumn.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Minecraft Forge
3 | * Copyright (c) 2016.
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation version 2.1
8 | * of the License.
9 | *
10 | * This library is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with this library; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | package io.github.opencubicchunks.cubicchunks.core.server.chunkio.async.forge;
21 |
22 | import com.google.common.base.MoreObjects;
23 | import mcp.MethodsReturnNonnullByDefault;
24 | import net.minecraft.world.World;
25 |
26 | import javax.annotation.Nonnull;
27 | import javax.annotation.Nullable;
28 | import javax.annotation.ParametersAreNonnullByDefault;
29 |
30 | @MethodsReturnNonnullByDefault
31 | @ParametersAreNonnullByDefault
32 | class QueuedColumn {
33 |
34 | final int x;
35 | final int z;
36 | @Nonnull final World world;
37 |
38 | QueuedColumn(int x, int z, World world) {
39 | this.x = x;
40 | this.z = z;
41 | this.world = world;
42 | }
43 |
44 | @Override
45 | public int hashCode() {
46 | return (x * 31 + z * 29) ^ world.hashCode();
47 | }
48 |
49 | @Override
50 | public boolean equals(@Nullable Object object) {
51 | if (object == null) {
52 | return false;
53 | }
54 | if (object == this) {
55 | return true;
56 | }
57 | if (object instanceof QueuedColumn) {
58 | QueuedColumn other = (QueuedColumn) object;
59 | return x == other.x && z == other.z && world == other.world;
60 | }
61 |
62 | return false;
63 | }
64 |
65 | @Override
66 | public String toString() {
67 | return MoreObjects.toStringHelper(this)
68 | .addValue(this.world)
69 | .add("x", this.x)
70 | .add("z", this.z)
71 | .toString();
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/server/vanillaproxy/IPositionPacket.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.server.vanillaproxy;
26 |
27 | import net.minecraft.util.math.BlockPos;
28 |
29 | public interface IPositionPacket {
30 | void setPosOffset(BlockPos posOffset);
31 | boolean hasPosOffset();
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/util/BucketSorterEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.util;
26 |
27 | public interface BucketSorterEntry {
28 | default long getSorterStorage(int id) {
29 | long[] containerData = getBucketEntryData();
30 | if (containerData == null || id >= containerData.length) {
31 | return 0;
32 | }
33 | return containerData[id];
34 | }
35 |
36 | default void setSorterStorage(int id, long value) {
37 | long[] containerData = getBucketEntryData();
38 | if (containerData == null || id >= containerData.length) {
39 | long[] newData = new long[id + 1];
40 | if (containerData != null) {
41 | System.arraycopy(containerData, 0, newData, 0, containerData.length);
42 | }
43 | this.setBucketEntryData(containerData = newData);
44 | }
45 | containerData[id] = value;
46 | }
47 |
48 | long[] getBucketEntryData();
49 |
50 | void setBucketEntryData(long[] data);
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/util/PlatformCompatUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.util;
26 |
27 | public class PlatformCompatUtils {
28 | private PlatformCompatUtils() {
29 | }
30 |
31 | private static final boolean isHybridEnv = isClassExists("org.bukkit.Bukkit");
32 |
33 | public static boolean isClassLoaded(String className) {
34 | try {
35 | Class.forName(className);
36 | return true;
37 | } catch (ClassNotFoundException e) {
38 | return false;
39 | }
40 | }
41 |
42 | public static boolean isClassExists(String className) {
43 | String classPath = className.replace('.', '/') + ".class";
44 | return Thread.currentThread().getContextClassLoader().getResource(classPath) != null;
45 | }
46 |
47 | public static boolean isHybridEnv() {
48 | return isHybridEnv;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/util/ticket/ITicket.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.util.ticket;
26 |
27 | import mcp.MethodsReturnNonnullByDefault;
28 |
29 | import javax.annotation.ParametersAreNonnullByDefault;
30 |
31 | @ParametersAreNonnullByDefault
32 | @MethodsReturnNonnullByDefault
33 | public interface ITicket {
34 |
35 | /**
36 | * Weather or not a cube with this ticket should tick.
37 | * (should blocks update, entities move around, and furnaces cook?)
38 | *
39 | * @return should cubes with this ticket tick
40 | */
41 | boolean shouldTick();
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/visibility/CubeSelector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.visibility;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.CubePos;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.util.math.ChunkPos;
30 |
31 | import java.util.Set;
32 | import java.util.function.Consumer;
33 |
34 | import javax.annotation.ParametersAreNonnullByDefault;
35 |
36 | @ParametersAreNonnullByDefault
37 | @MethodsReturnNonnullByDefault
38 | public abstract class CubeSelector {
39 |
40 | public abstract void forAllVisibleFrom(CubePos cubePos, int horizontalViewDistance, int verticalViewDistance, Consumer consumer);
41 |
42 | public abstract void findChanged(CubePos oldAddress, CubePos newAddress, int horizontalViewDistance, int verticalViewDistance,
43 | Set cubesToRemove, Set cubesToLoad, Set columnsToRemove, Set columnsToLoad);
44 |
45 | public abstract void findAllUnloadedOnViewDistanceDecrease(CubePos playerAddress, int oldHorizontalViewDistance, int newHorizontalViewDistance,
46 | int oldVerticalViewDistance, int newVerticalViewDistance, Set cubesToUnload, Set columnsToUnload);
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/world/ICubeProviderInternal.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.world;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.CubePos;
28 | import io.github.opencubicchunks.cubicchunks.api.world.ICubeProvider;
29 | import io.github.opencubicchunks.cubicchunks.core.server.chunkio.ICubeIO;
30 | import io.github.opencubicchunks.cubicchunks.core.world.cube.Cube;
31 | import mcp.MethodsReturnNonnullByDefault;
32 |
33 | import javax.annotation.Nullable;
34 | import javax.annotation.ParametersAreNonnullByDefault;
35 |
36 | /**
37 | * Version of ICubeProvider used internally
38 | */
39 | @ParametersAreNonnullByDefault
40 | @MethodsReturnNonnullByDefault
41 | public interface ICubeProviderInternal extends ICubeProvider {
42 |
43 | @Override
44 | @Nullable
45 | Cube getLoadedCube(int cubeX, int cubeY, int cubeZ);
46 |
47 | @Override
48 | @Nullable
49 | Cube getLoadedCube(CubePos coords);
50 |
51 | @Override
52 | Cube getCube(int cubeX, int cubeY, int cubeZ);
53 |
54 | @Override
55 | Cube getCube(CubePos coords);
56 |
57 | interface Server extends ICubeProviderInternal {
58 | ICubeIO getCubeIO();
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/world/ICubicChunkCache.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.world;
26 |
27 | import javax.annotation.Nullable;
28 |
29 | import io.github.opencubicchunks.cubicchunks.core.world.cube.Cube;
30 | import net.minecraft.util.math.BlockPos;
31 |
32 | public interface ICubicChunkCache {
33 |
34 | @Nullable Cube getCube(BlockPos pos);
35 |
36 | boolean isCubic();
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/world/IWorldEntitySpawner.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.world;
26 |
27 | import net.minecraft.world.WorldServer;
28 |
29 | import javax.annotation.Nullable;
30 |
31 | /**
32 | * An interface for custom entity spawner. Because vanilla entity spawner is final, an instance of class implementing this interface is added as a
33 | * field to WorldEntitySpawner, and can optionally replace the whole vanilla behavior.
34 | */
35 | public interface IWorldEntitySpawner {
36 | int findChunksForSpawning(WorldServer world, boolean hostileEnable, boolean peacefulEnable, boolean spawnOnSetTickRate);
37 |
38 | /**
39 | * This interface will be injected using Mixin on top of vanilla WorldEntitySpawner
40 | */
41 | interface Handler {
42 | void setEntitySpawner(@Nullable IWorldEntitySpawner spawner);
43 | @Nullable IWorldEntitySpawner getEntitySpawner();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/world/chunkloader/ForceCubeEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.world.chunkloader;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.CubePos;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraftforge.common.ForgeChunkManager;
30 | import net.minecraftforge.fml.common.eventhandler.Event;
31 |
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | public class ForceCubeEvent extends Event {
37 |
38 | public ForceCubeEvent(ForgeChunkManager.Ticket ticket, CubePos pos) {
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/world/chunkloader/UnforceCubeEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.world.chunkloader;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.util.CubePos;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraftforge.common.ForgeChunkManager;
30 | import net.minecraftforge.fml.common.eventhandler.Event;
31 |
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | public class UnforceCubeEvent extends Event {
37 |
38 | public UnforceCubeEvent(ForgeChunkManager.Ticket ticket, CubePos pos) {
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/world/provider/ICubicWorldProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.world.provider;
26 |
27 | import io.github.opencubicchunks.cubicchunks.api.worldgen.ICubeGenerator;
28 | import mcp.MethodsReturnNonnullByDefault;
29 | import net.minecraft.world.World;
30 |
31 | import javax.annotation.Nullable;
32 | import javax.annotation.ParametersAreNonnullByDefault;
33 |
34 | @ParametersAreNonnullByDefault
35 | @MethodsReturnNonnullByDefault
36 | public interface ICubicWorldProvider {
37 |
38 | /**
39 | * Creates a new Cube generator
40 | *
41 | * @return a new Cube generator
42 | */
43 | @Nullable ICubeGenerator createCubeGenerator();
44 |
45 | int getOriginalActualHeight();
46 |
47 | World getWorld();
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/io/github/opencubicchunks/cubicchunks/core/worldgen/generator/GlobalGeneratorConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
3 | *
4 | * Copyright (c) 2015-2021 OpenCubicChunks
5 | * Copyright (c) 2015-2021 contributors
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 | package io.github.opencubicchunks.cubicchunks.core.worldgen.generator;
26 |
27 | import io.github.opencubicchunks.cubicchunks.core.world.cube.Cube;
28 |
29 | /**
30 | * Configuration values for the CubicChunks custom terrain generator
31 | */
32 | public class GlobalGeneratorConfig {
33 |
34 | /**
35 | * Elevation for sea level
36 | */
37 | public static final int SEA_LEVEL = 64;
38 |
39 | /**
40 | * Maximum elevation for generated terrain
41 | */
42 | public static final double MAX_ELEV = 200;
43 |
44 | // TODO add javadoc here
45 | // these are constants. Changing them may cause issues.
46 | public static final int X_SECTION_SIZE = 4 + 1;
47 | public static final int Y_SECTION_SIZE = 8 + 1;
48 | public static final int Z_SECTION_SIZE = 4 + 1;
49 |
50 | public static final int X_SECTIONS = Cube.SIZE / (X_SECTION_SIZE - 1) + 1;
51 | public static final int Y_SECTIONS = Cube.SIZE / (Y_SECTION_SIZE - 1) + 1;
52 | public static final int Z_SECTIONS = Cube.SIZE / (Z_SECTION_SIZE - 1) + 1;
53 | }
54 |
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/lang/en_US.lang:
--------------------------------------------------------------------------------
1 | #################################
2 | ### general gui ###
3 | #################################
4 |
5 | cubicchunks.gui.worldmenu.cc_disable=CubicChunks: No
6 | cubicchunks.gui.worldmenu.cc_default=CubicChunks: Default
7 |
8 | #################################
9 | ### options ###
10 | #################################
11 |
12 | cubicchunks.gui.vertical_cube_load_distance=Vertical Distance: %d cubes
13 |
14 | #################################
15 | ### commands ###
16 | #################################
17 |
18 | cubicchunks.command.usage.cubicchunks=/cubicchunks subcommand
19 | cubicchunks.command.usage.config=/cubicchunks config subcommand
20 | cubicchunks.command.usage.config.set=/cubicchunks config set configOption value
21 | cubicchunks.command.usage.config.set_option=/cubicchunks config set %s value
22 | cubicchunks.command.usage.config.reload=/cubicchunks config reload
23 | cubicchunks.command.config.set.failed=Setting config option %s failed!
24 | cubicchunks.command.config.set.done=Config option %s has been set to "%s"
25 | cubicchunks.command.config.set.requires_restart=Changing config option %s requires world restart!
26 | cubicchunks.command.usage.config.set.primitive=Config option %s has type %s and requires 1 parameter
27 | cubicchunks.command.config.reload.done=Cubic Chunks config has been reloaded
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/lang/ru_ru.lang:
--------------------------------------------------------------------------------
1 | #################################
2 | ### general gui ###
3 | #################################
4 |
5 | cubicchunks.gui.worldmenu.cc_disable=CubicChunks: Нет
6 | cubicchunks.gui.worldmenu.cc_default=CubicChunks: По умолчанию
7 |
8 | #################################
9 | ### options ###
10 | #################################
11 |
12 | cubicchunks.gui.vertical_cube_load_distance=Вертикальная дистанция: %d кубов
13 |
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks/7165b37d6c85d123a442fb9079f8dda1e7a6247d/src/main/resources/assets/cubicchunks/logo.png
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/models/item/get_light_value.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "cubicchunks:item/get_light_value"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/models/item/relight_sky_block.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "cubicchunks:item/relight_sky_block"
5 | }
6 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/textures/item/get_light_value.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks/7165b37d6c85d123a442fb9079f8dda1e7a6247d/src/main/resources/assets/cubicchunks/textures/item/get_light_value.png
--------------------------------------------------------------------------------
/src/main/resources/assets/cubicchunks/textures/item/relight_sky_block.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks/7165b37d6c85d123a442fb9079f8dda1e7a6247d/src/main/resources/assets/cubicchunks/textures/item/relight_sky_block.png
--------------------------------------------------------------------------------
/src/main/resources/cubicchunks.mixins.core_sided.bukkit.json:
--------------------------------------------------------------------------------
1 | {
2 | "required": false,
3 | "package": "io.github.opencubicchunks.cubicchunks.core.asm.mixin.core_sided.bukkit",
4 | "refmap": "cubicchunks.mixins.refmap.json",
5 | "compatibilityLevel": "JAVA_8",
6 | "minVersion": "0.7.10",
7 | "overwrites": {
8 | "conformVisibility": true
9 | },
10 | "mixins": [
11 | "common.MixinWorld_HeightLimits_Bukkit_Sided",
12 | "common.MixinPlayerList_Bukkit_Sided",
13 | "common.MixinChunk_Cubes_Bukkit_Sided"
14 | ],
15 | "client": [],
16 | "server": []
17 | }
--------------------------------------------------------------------------------
/src/main/resources/cubicchunks.mixins.core_sided.vanilla.json:
--------------------------------------------------------------------------------
1 | {
2 | "required": false,
3 | "package": "io.github.opencubicchunks.cubicchunks.core.asm.mixin.core_sided.vanilla",
4 | "refmap": "cubicchunks.mixins.refmap.json",
5 | "compatibilityLevel": "JAVA_8",
6 | "minVersion": "0.7.10",
7 | "overwrites": {
8 | "conformVisibility": true
9 | },
10 | "mixins": [
11 | "common.MixinChunk_Cubes_Vanilla_Sided",
12 | "common.MixinWorld_HeightLimits_Vanilla_Sided",
13 | "common.MixinPlayerList_Vanilla_Sided"
14 | ],
15 | "client": [],
16 | "server": []
17 | }
--------------------------------------------------------------------------------
/src/main/resources/cubicchunks.mixins.noncritical.json:
--------------------------------------------------------------------------------
1 | {
2 | "required": false,
3 | "package": "io.github.opencubicchunks.cubicchunks.core.asm.mixin.noncritical",
4 | "refmap": "cubicchunks.mixins.refmap.json",
5 | "compatibilityLevel": "JAVA_8",
6 | "minVersion": "0.7.10",
7 | "overwrites": {
8 | "conformVisibility": true
9 | },
10 | "mixins": [
11 | "common.command.MixinCommandBase",
12 | "common.command.MixinCommandFill",
13 | "common.command.MixinCommandsHeightLimits",
14 | "common.command.MixinCommandTeleport",
15 | "common.command.MixinCommandTP",
16 | "common.MixinBlockPistonBase_HeightFix",
17 | "common.MixinTileEntityBeacon"
18 | ],
19 | "client": [
20 | "client.MixinGuiOverlayDebug",
21 | "client.MixinRenderChunk",
22 | "client.MixinRenderWorker",
23 | "client.MixinViewFrustum_VertViewDistance"
24 | ],
25 | "server": []
26 | }
--------------------------------------------------------------------------------
/src/main/resources/cubicchunks.mixins.selectable.json:
--------------------------------------------------------------------------------
1 | {
2 | "required": true,
3 | "package": "io.github.opencubicchunks.cubicchunks.core.asm.mixin.selectable",
4 | "refmap": "cubicchunks.mixins.refmap.json",
5 | "plugin": "io.github.opencubicchunks.cubicchunks.core.asm.CubicChunksMixinConfig",
6 | "compatibilityLevel": "JAVA_8",
7 | "minVersion": "0.7.10",
8 | "injectors": {
9 | "defaultRequire": 1
10 | },
11 | "overwrites": {
12 | "conformVisibility": true
13 | },
14 | "mixins": [
15 | "common.MixinChunkCache",
16 | "common.MixinPathNavigate",
17 | "common.MixinTileEntityBeaconBetterFps",
18 | "common.MixinWalkNodeProcessor",
19 | "common.MixinWorld_CollisionCheck",
20 | "common.MixinWorld_SlowCollisionCheck",
21 | "common.MixinWorldServer_UpdateBlocks"
22 | ],
23 | "client": [
24 | "client.IGuiVideoSettings",
25 | "client.MixinChunkCache_Cubic",
26 | "client.MixinChunkCache_Vanilla",
27 | "client.MixinRenderGlobalNoOptifine",
28 | "client.optifine.MixinChunkVisibility",
29 | "client.optifine.MixinExtendedBlockStorage",
30 | "client.optifine.MixinRenderChunk",
31 | "client.optifine.MixinRenderChunkUtils",
32 | "client.optifine.MixinRenderGlobalOptifine_E",
33 | "client.optifine.MixinRenderList",
34 | "client.optifine.MixinViewFrustum",
35 | "client.vertviewdist.MixinEntityRenderer",
36 | "client.vertviewdist.MixinRenderGlobal",
37 | "client.vertviewdist.MixinRenderGlobalNoOptifine"
38 | ],
39 | "server": []
40 | }
--------------------------------------------------------------------------------
/src/main/resources/mcmod.info:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "modid": "cubicchunks",
4 | "name": "CubicChunks",
5 | "description": "Extends Minecraft height by changing chunk size to 16x16x16 blocks.",
6 | "version": "%%VERSION%%",
7 | "mcversion": "1.12.2",
8 | "url": "",
9 | "updateUrl": "",
10 | "authorList": [
11 | "Barteks2x",
12 | "Cuchaz",
13 | "Razaekel"
14 | ],
15 | "credits": "Based on Cuchaz's TWM mod, initial idea and first implementation by Robinton. Notable contributors: Cyclonit, xcube16, Boreeas, Foghrye4. Special thanks to: jellusquid3 for allowinf Phosphor light engine to be used under the MIT license. MineCrak for help with 1.6.* CubicChunks. Calacbolg - the CubicChunks suggestion inspired me to start working on CubicChunks mod, and made the idea more well known",
16 | "logoFile": "/assets/cubicchunks/logo.png",
17 | "screenshots": [],
18 | "dependencies": ["after:forge@[14.23.5.2859,]"]
19 | }
20 | ]
21 |
--------------------------------------------------------------------------------