Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8fae17b
Work on worlgen framework some more
RecursivePineapple Sep 13, 2025
ab1db58
CoordinatePacker mixin
RecursivePineapple Oct 24, 2025
2ce21a8
Prevent LightingManager NPE
RecursivePineapple Oct 24, 2025
c2abab5
Cleanup
RecursivePineapple Oct 24, 2025
0ff06b3
Angelica interop
RecursivePineapple Oct 24, 2025
a78a771
Merge branch 'master' into improve-worldgen
RecursivePineapple Oct 25, 2025
ac05363
Lots of changes
RecursivePineapple Nov 14, 2025
6448476
spotless
RecursivePineapple Nov 14, 2025
b114a6b
Works somewhat better
RecursivePineapple Nov 16, 2025
2974efc
Several improvements
RecursivePineapple Nov 20, 2025
4012262
MORE WORLDGEN FIXES!!! + chunk api/endless ids compat + 3d biomes + o…
RecursivePineapple Nov 27, 2025
f574dbb
Make sure it compiles
RecursivePineapple Nov 27, 2025
0c00345
spotless
RecursivePineapple Nov 27, 2025
7f4a325
Fix EBS Y Level
RecursivePineapple Nov 28, 2025
a902c30
Checkstyle fixes
RecursivePineapple Nov 28, 2025
c11acb1
fix dep versions
RecursivePineapple Nov 28, 2025
ba79156
:clueless:
RecursivePineapple Nov 28, 2025
cf56aca
Update src/main/java/com/cardinalstar/cubicchunks/api/CCAPI.java
RecursivePineapple Jan 11, 2026
686b5af
Update dependency graphs
RecursivePineapple Jan 11, 2026
25b0704
oops
RecursivePineapple Jan 11, 2026
44b764b
spotlessApply (#40)
github-actions[bot] Jan 11, 2026
4cc0191
Merge branch 'master' into improve-worldgen
Cardinalstars Jan 15, 2026
b6ae1aa
Update src/main/java/com/cardinalstar/cubicchunks/server/CubicPlayerM…
RecursivePineapple Jan 16, 2026
db3710b
Review changes + biome fixes
RecursivePineapple Jan 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions addon.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
79 changes: 74 additions & 5 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,81 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api("com.github.GTNewHorizons:GTNHLib:0.6.39:dev")
api("io.github.opencubicchunks:regionlib:0.78.0-SNAPSHOT")
runtimeOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.4-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.8.15:dev")
implementation("com.github.GTNewHorizons:RegionLib:v0.1.0-GTNH:dev")
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.8.40-GTNH:dev")

runtimeOnlyNonPublishable(rfg.deobf("curse.maven:spark-361579:4271867"))
compileOnly("com.falsepattern:chunkapi-mc1.7.10:0.7.0:dev")
compileOnly("com.falsepattern:endlessids-mc1.7.10:1.6.14:dev")

// runtimeOnlyNonPublishable("com.falsepattern:chunkapi-mc1.7.10:0.7.0-1-g67006b5-dirty:dev")
// implementation("com.falsepattern:endlessids-mc1.7.10:1.6.14-dirty:dev")

compileOnly("org.jetbrains:annotations:26.0.2")

compileOnly('org.projectlombok:lombok:1.18.34')
annotationProcessor('org.projectlombok:lombok:1.18.34')

devOnlyNonPublishable("ganymedes01.etfuturum:Et-Futurum-Requiem:2.6.2.21-GTNH-daily:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:Angelica:1.0.0-beta56:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:Angelica:1.0.0-beta68:dev")

devOnlyNonPublishable rfg.deobf("curse.maven:biomes-o-plenty-220318:2499612")

devOnlyNonPublishable("com.github.GTNewHorizons:Realistic-World-Gen:1.4.0")

// devOnlyNonPublishable('com.github.GTNewHorizons:CodeChickenCore:1.4.8:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:Railcraft:9.17.6:dev')

// Adds various useful features
// devOnlyNonPublishable("com.github.GTNewHorizons:EnderCore:0.5.0:dev")

// devOnlyNonPublishable('com.github.GTNewHorizons:ThaumicBoots:1.5.2:dev') {
// exclude module: "witchery"
// exclude module: "TCNEIAdditions"
// }
// devOnlyNonPublishable('com.github.GTNewHorizons:ThaumicBases:1.9.5:dev') {exclude module: "Baubles" }
// devOnlyNonPublishable('com.github.GTNewHorizons:ForgeMultipart:1.7.0:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:Botania:1.13.6-GTNH:api')
// devOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.10.2-GTNH:api')
// devOnlyNonPublishable('com.github.GTNewHorizons:TinkersConstruct:1.14.12-GTNH:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:ForbiddenMagic:0.9.7-GTNH:dev') {exclude module: "Baubles" }
// devOnlyNonPublishable('com.github.GTNewHorizons:twilightforest:2.7.13:dev')
// devOnlyNonPublishable(rfg.deobf('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'))
// devOnlyNonPublishable(rfg.deobf('curse.maven:witchery-69673:2234410'))

// devOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.4.0:dev")
// devOnlyNonPublishable('com.github.GTNewHorizons:EnderIO:2.10.5:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:MatterManipulator:0.1.3-GTNH:dev')

// devOnlyNonPublishable("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.127:dev") { transitive=false }

// devOnlyNonPublishable("com.github.GTNewHorizons:Galacticraft:3.4.7-GTNH:dev") {
// exclude group: "com.github.GTNewHorizons", module: "GT5-Unofficial"
// }

// devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughIds:2.1.10:dev')

// devOnlyNonPublishable rfg.deobf("curse.maven:extra-utilities-225561:2264384")
// devOnlyNonPublishable("com.github.GTNewHorizons:Mobs-Info:0.5.8-GTNH:dev")
//
// devOnlyNonPublishable("com.github.GTNewHorizons:ForestryMC:4.11.2:dev")
// devOnlyNonPublishable('com.github.GTNewHorizons:neiaddons:1.17.0:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.10.2-GTNH:dev')
// devOnlyNonPublishable('com.github.GTNewHorizons:Binnie:2.6.0:dev')
//
// devOnlyNonPublishable("com.github.GTNewHorizons:TinkersConstruct:1.14.12-GTNH:dev")
//
// devOnlyNonPublishable("com.github.GTNewHorizons:StructureLib:1.4.24:dev")
// devOnlyNonPublishable("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:ModularUI:1.3.1:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:ModularUI2:2.3.18-1.7.10:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:waila:1.9.15:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-749-GTNH:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.5.26-gtnh:dev")
// devOnlyNonPublishable('com.github.GTNewHorizons:Yamcl:0.7.1:dev')
// devOnlyNonPublishable("com.github.GTNewHorizons:Postea:1.1.3:dev")

testImplementation(platform('org.junit:junit-bom:5.9.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ usesMixins = true
separateMixinSourceSet =

# Adds some debug arguments like verbose output and class export.
usesMixinDebug = true
usesMixinDebug = false

# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
Expand Down
38 changes: 37 additions & 1 deletion repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,42 @@
repositories {
mavenCentral()
maven {
setUrl("https://oss.sonatype.org/content/repositories/public/")
setUrl("https://oss.sonatype.org/service/local/repositories/snapshots/content/")
}
exclusiveContent {
forRepository {
ivy {
name = 'CoreTweaks releases'
url = 'https://github.com/makamys/CoreTweaks/releases/download/'
patternLayout {
artifact '[revision]/[module]-1.7.10-[revision]+nomixin(-[classifier])(.[ext])'
}
metadataSources {
artifact()
}
}
}
filter {
includeGroup('CoreTweaks')
}
}
exclusiveContent {
forRepository {
maven {
name = 'glease'
url = 'https://maven.glease.net/repos/releases/'
}
}
filter {
includeGroup('net.glease')
}
}
maven {
name = "mavenpattern"
url = "https://mvn.falsepattern.com/releases"
content {
includeGroup("com.falsepattern")
}
}
mavenLocal()
}
82 changes: 43 additions & 39 deletions src/main/java/com/cardinalstar/cubicchunks/CubicChunks.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,33 @@
import javax.annotation.ParametersAreNonnullByDefault;

import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.WorldServer;
import net.minecraft.world.storage.ISaveHandler;
import net.minecraftforge.common.MinecraftForge;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.cardinalstar.cubicchunks.api.world.storage.ICubicStorage;
import com.cardinalstar.cubicchunks.api.world.storage.StorageFormatProviderBase;
import com.cardinalstar.cubicchunks.api.worldgen.VanillaCompatibilityGeneratorProviderBase;
import com.cardinalstar.cubicchunks.api.world.storage.StorageFormatFactory;
import com.cardinalstar.cubicchunks.api.worldtype.VanillaCubicWorldType;
import com.cardinalstar.cubicchunks.async.TaskPool;
import com.cardinalstar.cubicchunks.event.handlers.ClientEventHandler;
import com.cardinalstar.cubicchunks.event.handlers.CommonEventHandler;
import com.cardinalstar.cubicchunks.mixin.api.ICubicWorldSettings;
import com.cardinalstar.cubicchunks.mixin.early.common.IIntegratedServer;
import com.cardinalstar.cubicchunks.network.NetworkChannel;
import com.cardinalstar.cubicchunks.server.chunkio.RegionCubeStorage;
import com.cardinalstar.cubicchunks.util.CompatHandler;
import com.cardinalstar.cubicchunks.util.Mods;
import com.cardinalstar.cubicchunks.util.SideUtils;
import com.cardinalstar.cubicchunks.world.type.VanillaCubicWorldType;
import com.cardinalstar.cubicchunks.worldgen.VanillaCompatibilityGenerator;
import com.cardinalstar.cubicchunks.world.worldgen.WorldGenerators;
import com.cardinalstar.cubicchunks.worldgen.WorldgenHangWatchdog;
import com.falsepattern.chunk.api.DataRegistry;
import com.gtnewhorizon.gtnhlib.config.ConfigException;
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;

import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.ICrashCallable;
import cpw.mods.fml.common.Loader;
Expand All @@ -65,7 +67,6 @@
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkCheckHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.internal.NetworkModHolder;
Expand Down Expand Up @@ -121,8 +122,11 @@ public class CubicChunks {
public void preInit(FMLPreInitializationEvent e) {
LOGGER = e.getModLog();

registerVanillaCompatibilityGeneratorProvider();
registerAnvil3dStorageFormatProvider();
VanillaCubicWorldType.init();

LOGGER.debug("Registered world types");

try {
ConfigurationManager.registerConfig(CubicChunksConfig.class);
} catch (ConfigException ex) {
Expand All @@ -145,8 +149,6 @@ public String call() throws Exception {
return message;
}
});
VanillaCubicWorldType.create();
LOGGER.debug("Registered world types");

// we have to redo the check for network compatibility because it depends on config
// and config is done after forge does the check
Expand All @@ -155,6 +157,8 @@ public String call() throws Exception {
Loader.instance()
.activeModContainer());
holder.testVanillaAcceptance();
WorldGenerators.init();
TaskPool.init();
}

@Mod.EventHandler
Expand All @@ -177,6 +181,10 @@ public void init(FMLInitializationEvent event) {
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
CompatHandler.init();

if (Mods.ChunkAPI.isModLoaded()) {
DataRegistry.disableDataManager("chunkapi", "lighting");
}
}

@Mod.EventHandler
Expand All @@ -196,31 +204,8 @@ public void onServerAboutToStart(FMLServerAboutToStartEvent event) {
});
}

@SubscribeEvent
public static void registerVanillaCompatibilityGeneratorProvider() {
VanillaCompatibilityGeneratorProviderBase.REGISTRY.register(
VanillaCompatibilityGeneratorProviderBase.DEFAULT,
new VanillaCompatibilityGeneratorProviderBase() {

@Override
public VanillaCompatibilityGenerator provideGenerator(IChunkProvider vanillaChunkGenerator,
World world) {
return new VanillaCompatibilityGenerator(vanillaChunkGenerator, world);
}
}.setRegistryName(VanillaCompatibilityGeneratorProviderBase.DEFAULT)
.setUnlocalizedName("cubicchunks.gui.worldmenu.cc_default"));
}

@SubscribeEvent
public static void registerAnvil3dStorageFormatProvider() {
StorageFormatProviderBase.REGISTRY.register(StorageFormatProviderBase.DEFAULT, new StorageFormatProviderBase() {

@Override
public ICubicStorage provideStorage(World world, Path path) throws IOException {
return new RegionCubeStorage(path);
}
}.setRegistryName(StorageFormatProviderBase.DEFAULT)
.setUnlocalizedName("cubicchunks.gui.storagefmt.anvil3d"));
StorageFormatFactory.REGISTRY.register(StorageFormatFactory.DEFAULT, new DefaultStorageFormatFactory());
}

@NetworkCheckHandler
Expand Down Expand Up @@ -300,10 +285,29 @@ public static void bigWarning(String format, Object... data) {
LOGGER.log(Level.WARN, "****************************************");
}

public static boolean hasOptifine() {
return SideUtils.getForSide(
() -> () -> FMLClientHandler.instance()
.hasOptifine(),
() -> () -> false);
private static class DefaultStorageFormatFactory extends StorageFormatFactory {

public DefaultStorageFormatFactory() {
setRegistryName(StorageFormatFactory.DEFAULT);
setUnlocalizedName("cubicchunks.gui.storagefmt.anvil3d");
}

@Override
public Path getWorldSaveDirectory(ISaveHandler saveHandler, WorldServer worldServer) {
Path path = worldServer.getSaveHandler()
.getWorldDirectory()
.toPath();

if (worldServer.provider.getSaveFolder() != null) {
return path.resolve(worldServer.provider.getSaveFolder());
} else {
return path;
}
}

@Override
public ICubicStorage provideStorage(World world, Path path) throws IOException {
return new RegionCubeStorage(path);
}
}
}
Loading