This commit is contained in:
Cailin Smith
2023-07-02 22:10:05 +02:00
61 changed files with 390 additions and 267 deletions
+88
View File
@@ -9,6 +9,9 @@ stages:
- build_1_18_2
- build_1_19_4
- build_1_20_1
- build_1_19_2
- api
- pages
variables:
# Pull core when building
@@ -49,6 +52,39 @@ build_1_18_2:
- cache/
allow_failure: true
# 1.19.2 build
build_1_19_2:
stage: build_1_19_2
script:
# this both runs the unit tests and assembles the code
- ./gradlew clean -PmcVer="1.19.2" --gradle-user-home cache/;
- ./gradlew build -PmcVer="1.19.2" --gradle-user-home cache/;
- ./gradlew mergeJars -PmcVer="1.19.2" --gradle-user-home cache/;
image: eclipse-temurin:17
artifacts:
name: "NightlyBuild_1_19_2-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
- Merged/*.jar
- fabric/build/libs/*.jar
- forge/build/libs/*.jar
- quilt/build/libs/*.jar
exclude:
# TODO: There is a lot of duplicate stuff here, fix it later to be smaller
- fabric/build/libs/*-all.jar
- fabric/build/libs/*-sources.jar
- forge/build/libs/*-all.jar
- forge/build/libs/*-sources.jar
- quilt/build/libs/*-all.jar
- quilt/build/libs/*-sources.jar
expire_in: 1 day
when: always
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: true
# 1.19.4 build
build_1_19_4:
@@ -120,6 +156,58 @@ build_1_20_1:
allow_failure: true
api:
stage: api
script:
# this should only run for the API
- ./gradlew api:clean --gradle-user-home cache/;
# this also runs unit tests
- ./gradlew api:build --gradle-user-home cache/;
- ./gradlew api:addSourcesToCompiledJar --gradle-user-home cache/;
image: eclipse-temurin:17
artifacts:
name: "Api_NightlyBuild-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
- coreSubProjects/api/build/libs/merged/*.jar
# can be uncommented if we don't want a jar with the source code
# - coreSubProjects/api/build/libs/*.jar
exclude:
- coreSubProjects/api/build/libs/merged/*-all.jar
- coreSubProjects/api/build/libs/merged/*-sources.jar
expire_in: 1 day
when: always
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: true
# generate and publish API javadocs
pages:
stage: pages
script:
# this should only run for the API
- ./gradlew api:clean --gradle-user-home cache/;
# this also runs unit tests
- ./gradlew api:build --gradle-user-home cache/;
- ./gradlew api:javadoc --gradle-user-home cache/;
- mkdir public
- cp -r $CI_PROJECT_DIR/coreSubProjects/api/build/docs/javadoc/. public
image: eclipse-temurin:17
artifacts:
paths:
- public
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: false
+7 -3
View File
@@ -420,12 +420,16 @@ allprojects { p ->
apply plugin: "java"
apply plugin: "maven-publish"
archivesBaseName = rootProject.mod_name
version = project.name + "-" + rootProject.versionStr
group = rootProject.maven_group
// this is the text that appears at the top of the overview (home) page
// and is used when bookmarking a page
javadoc.title = rootProject.mod_name + "-" + project.name
repositories {
// The central repo
mavenCentral()
+2 -4
View File
@@ -10,11 +10,9 @@ echo So if someone does use Windows and knows how to script stuff then can you p
@REM Old BAT script if you need some help with this task
@REM SETLOCAL
@REM CALL :buildVersion "1.19"
@REM CALL :buildVersion "1.18.2"
@REM CALL :buildVersion "1.18.1"
@REM CALL :buildVersion "1.17.1"
@REM CALL :buildVersion "1.16.5"
@REM CALL :buildVersion "1.19.4"
@REM CALL :buildVersion "1.20.1"
@REM EXIT /B %ERRORLEVEL%
@REM
@REM :buildVersion
@@ -22,7 +22,7 @@ package com.seibel.distanthorizons.common.forge;
import com.seibel.distanthorizons.common.wrappers.minecraft.MinecraftClientWrapper;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.core.Direction;
#if POST_MC_1_19
#if POST_MC_1_19_2
import net.minecraft.util.RandomSource;
#endif
import net.minecraft.world.level.ColorResolver;
@@ -39,7 +39,7 @@ import java.util.Random;
* @author Ran
*/
public interface LodForgeMethodCaller {
#if PRE_MC_1_19
#if PRE_MC_1_19_2
List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random); // FIXME: For 1.19
#else
List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random); // FIXME: For 1.19
@@ -58,7 +58,7 @@ public class VersionConstants implements IVersionConstants
@Override
public String getMinecraftVersion() {
#if PRE_MC_1_19
#if PRE_MC_1_19_2
return Minecraft.getInstance().getGame().getVersion().getId();
#else
return SharedConstants.getCurrentVersion().getId();
@@ -94,7 +94,7 @@ public class WrapperFactory implements IWrapperFactory
}
}
// MC 1.18
// MC 1.18, 1.19, 1.20
#if POST_MC_1_17_1
else if (objectArray.length == 2)
{
@@ -123,7 +123,11 @@ public class WrapperFactory implements IWrapperFactory
#else
// Intentional compiler error to bring attention to the missing wrapper function.
// If you need to work on an unimplemented version but don't have the ability to implement this yet
// you can comment it out, but please don't commit it. Someone will have to implement it
// you can comment it out, but please don't commit it. Someone will have to implement it .
// After implementing the new version please read this method's javadocs for instructions
// on what other locations also need to be updated, the DhAPI specifically needs to
// be updated to state which objects this method accepts.
not implemented for this version of Minecraft!
#endif
}
@@ -137,7 +141,7 @@ public class WrapperFactory implements IWrapperFactory
"Chunk wrapper creation failed. \n" +
"Expected parameters: \n");
// MC 1.18
// MC 1.18, 1.19, 1.20
#if POST_MC_1_17_1
message.append("["+ChunkAccess.class.getName()+"], \n");
message.append("["+LevelReader.class.getName()+"]. \n");
@@ -30,7 +30,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.world.IBiomeWrapper;
import net.minecraft.client.Minecraft;
import net.minecraft.core.Holder;
#if POST_MC_1_19
#if POST_MC_1_19_2
import net.minecraft.data.worldgen.biome.EndBiomes;
import net.minecraft.data.worldgen.biome.NetherBiomes;
#endif
@@ -19,7 +19,7 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.FlowerBlock;
import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.RotatedPillarBlock;
#if POST_MC_1_19
#if POST_MC_1_19_2
import net.minecraft.util.RandomSource;
#endif
import net.minecraft.world.level.block.state.BlockState;
@@ -37,7 +37,7 @@ public class ClientBlockStateCache
private static final Logger LOGGER = DhLoggerBuilder.getLogger();
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public static final Random random = new Random(0);
#else
public static final RandomSource random = RandomSource.create();
@@ -144,7 +144,7 @@ public class ChunkWrapper implements IChunkWrapper
#if PRE_MC_1_17_1
return BiomeWrapper.getBiomeWrapper(chunk.getBiomes().getNoiseBiome(
x >> 2, y >> 2, z >> 2));
#elif PRE_MC_1_18_1
#elif PRE_MC_1_18_2
return BiomeWrapper.getBiomeWrapper(chunk.getBiomes().getNoiseBiome(
QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)));
#elif PRE_MC_1_18_2
@@ -176,7 +176,7 @@ public class ChunkWrapper implements IChunkWrapper
@Override
public boolean isLightCorrect()
{
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
return true;
#else
if (this.chunk instanceof LevelChunk)
@@ -399,7 +399,7 @@ public class ChunkWrapper implements IChunkWrapper
public static void syncedUpdateClientLightStatus()
{
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
// TODO: Check what to do in 1.18.1, or in other versions
#else
weakMapLock.writeLock().lock();
@@ -53,7 +53,7 @@ import net.minecraft.client.resources.language.I18n; // translation
#if POST_MC_1_17_1
import net.minecraft.client.gui.narration.NarratableEntry;
#endif
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
#endif
@@ -5,7 +5,7 @@ import net.minecraft.client.gui.components.Button;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
#endif
@@ -15,7 +15,7 @@ public class GuiHelper {
* Helper static methods for versional compat
*/
public static Button MakeBtn(Component base, int a, int b, int c, int d, Button.OnPress action) {
#if PRE_MC_1_19
#if PRE_MC_1_19_4
return new Button(a, b, c, d, base, action);
#else
return Button.builder(base, action).bounds(a,b,c,d).build();
@@ -23,7 +23,7 @@ public class GuiHelper {
}
public static MutableComponent TextOrLiteral(String text) {
#if PRE_MC_1_19
#if PRE_MC_1_19_2
return new TextComponent(text);
#else
return Component.literal(text);
@@ -31,7 +31,7 @@ public class GuiHelper {
}
public static MutableComponent TextOrTranslatable(String text) {
#if PRE_MC_1_19
#if PRE_MC_1_19_2
return new TextComponent(text);
#else
return Component.translatable(text);
@@ -39,7 +39,7 @@ public class GuiHelper {
}
public static MutableComponent Translatable(String text, Object... args) {
#if PRE_MC_1_19
#if PRE_MC_1_19_2
return new TranslatableComponent(text, args);
#else
return Component.translatable(text, args);
@@ -47,7 +47,7 @@ public class GuiHelper {
}
public static void SetX(AbstractWidget w, int x) {
#if PRE_MC_1_19
#if PRE_MC_1_19_4
w.x = x;
#else
w.setX(x);
@@ -55,7 +55,7 @@ public class GuiHelper {
}
public static void SetY(AbstractWidget w, int y) {
#if PRE_MC_1_19
#if PRE_MC_1_19_4
w.y = y;
#else
w.setY(y);
@@ -25,7 +25,7 @@ public class MinecraftScreen {
private AbstractScreen screen;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public static net.minecraft.network.chat.TranslatableComponent translate (String str, Object... args) {
return new net.minecraft.network.chat.TranslatableComponent(str, args);
}
@@ -44,7 +44,7 @@ public class TexturedButtonWidget extends ImageButton {
super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, text);
}
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public TexturedButtonWidget(int x, int y, int width, int height, int u, int v, int hoveredVOffset, ResourceLocation texture, int textureWidth, int textureHeight, OnPress pressAction, OnTooltip tooltipSupplier, Component text) {
super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, tooltipSupplier, text);
}
@@ -21,7 +21,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener;
import net.minecraft.client.gui.narration.NarratableEntry;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.network.chat.TextComponent;
#endif
@@ -43,7 +43,7 @@ import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.resources.model.ModelManager;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.network.chat.TextComponent;
#endif
import net.minecraft.server.level.ServerLevel;
@@ -223,7 +223,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra
{
LocalPlayer p = getPlayer();
if (p == null) return;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
p.sendMessage(new TextComponent(string), getPlayer().getUUID());
#else
p.sendSystemMessage(net.minecraft.network.chat.Component.translatable(string));
@@ -138,7 +138,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
@Override
public double getGamma()
{
#if PRE_MC_1_19
#if PRE_MC_1_19_2
return MC.options.gamma;
#else
return MC.options.gamma().get();
@@ -186,7 +186,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
@Override
public int getRenderDistance()
{
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
//FIXME: How to resolve this?
return MC.options.renderDistance;
#else
@@ -278,7 +278,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
try {
LevelRenderer levelRenderer = MC.levelRenderer;
Collection<LevelRenderer.RenderChunkInfo> chunks =
#if PRE_MC_1_18_1 levelRenderer.renderChunks;
#if PRE_MC_1_18_2 levelRenderer.renderChunks;
#else levelRenderer.renderChunkStorage.get().renderChunks; #endif
return (chunks.stream().map((chunk) -> {
@@ -20,6 +20,8 @@
package com.seibel.distanthorizons.common.wrappers.worldGeneration;
import com.google.common.collect.ImmutableMap;
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.distanthorizons.api.enums.worldGeneration.EDhApiWorldGenerationStep;
import com.seibel.distanthorizons.common.wrappers.world.ServerLevelWrapper;
import com.seibel.distanthorizons.common.wrappers.worldGeneration.mimicObject.*;
@@ -55,7 +57,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStruc
import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepStructureStart;
import com.seibel.distanthorizons.common.wrappers.worldGeneration.step.StepSurface;
#if POST_MC_1_19
#if POST_MC_1_19_4
import net.minecraft.core.registries.Registries;
#endif
@@ -191,7 +193,21 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
}
public static ThreadLocal<Boolean> isDistantGeneratorThread = new ThreadLocal<>();
public static ThreadLocal<Object> onDistantGenerationMixinData = new ThreadLocal<>();
public static boolean isCurrentThreadDistantGeneratorThread() { return (isDistantGeneratorThread.get() != null); }
public static void putDistantGenerationMixinData(Object data) {
LodUtil.assertTrue(isCurrentThreadDistantGeneratorThread());
onDistantGenerationMixinData.set(data);
}
public static Object getDistantGenerationMixinData() {
LodUtil.assertTrue(isCurrentThreadDistantGeneratorThread());
return onDistantGenerationMixinData.get();
}
public static void clearDistantGenerationMixinData() {
LodUtil.assertTrue(isCurrentThreadDistantGeneratorThread());
onDistantGenerationMixinData.remove();
}
public static final DhThreadFactory threadFactory = new DhThreadFactory("DH-Gen-Worker-Thread", Thread.MIN_PRIORITY);
@@ -200,10 +216,35 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
//==============//
// constructors //
//==============//
public static ImmutableMap<EDhApiWorldGenerationStep, Integer> BorderNeeded;
public static int MaxBorderNeeded;
static
{
DependencySetupDoneCheck.getIsCurrentThreadDistantGeneratorThread = BatchGenerationEnvironment::isCurrentThreadDistantGeneratorThread;
boolean isTerraFirmaCraft = false;
try {
Class.forName("net.dries007.tfc.world.TFCChunkGenerator");
isTerraFirmaCraft = true;
} catch (ClassNotFoundException e) {
//Ignore
}
EVENT_LOGGER.info("DH TerraFirmaCraft detection: " + isTerraFirmaCraft);
ImmutableMap.Builder<EDhApiWorldGenerationStep, Integer> builder = ImmutableMap.builder();
builder.put(EDhApiWorldGenerationStep.EMPTY, 1);
builder.put(EDhApiWorldGenerationStep.STRUCTURE_START, 0);
builder.put(EDhApiWorldGenerationStep.STRUCTURE_REFERENCE, 0);
builder.put(EDhApiWorldGenerationStep.BIOMES, isTerraFirmaCraft ? 1 : 0);
builder.put(EDhApiWorldGenerationStep.NOISE, isTerraFirmaCraft ? 1 : 0);
builder.put(EDhApiWorldGenerationStep.SURFACE, 0);
builder.put(EDhApiWorldGenerationStep.CARVERS, 0);
builder.put(EDhApiWorldGenerationStep.LIQUID_CARVERS, 0);
builder.put(EDhApiWorldGenerationStep.FEATURES, 0);
builder.put(EDhApiWorldGenerationStep.LIGHT, 0);
BorderNeeded = builder.build();
MaxBorderNeeded = BorderNeeded.values().stream().mapToInt(Integer::intValue).max().getAsInt();
}
public BatchGenerationEnvironment(IDhServerLevel serverlevel)
@@ -219,12 +260,17 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
if (generator.getClass().toString().equals("class com.terraforged.mod.chunk.TFChunkGenerator"))
{
EVENT_LOGGER.info("TerraForge Chunk Generator detected: ["+generator.getClass()+"], Distant Generation will try its best to support it.");
EVENT_LOGGER.info("If it does crash, turn Distant Generation off or set it to to ["+EDhApiWorldGenerationStep.EMPTY+"].");
EVENT_LOGGER.info("If it does crash, turn Distant Generation off or set it to to ["+EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY+"].");
}
else if (generator.getClass().toString().equals("class net.dries007.tfc.world.TFCChunkGenerator"))
{
EVENT_LOGGER.info("TerraFirmaCraft Chunk Generator detected: ["+generator.getClass()+"], Distant Generation will try its best to support it.");
EVENT_LOGGER.info("If it does crash, turn Distant Generation off or set it to to ["+ EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY +"].");
}
else
{
EVENT_LOGGER.warn("Unknown Chunk Generator detected: ["+generator.getClass()+"], Distant Generation May Fail!");
EVENT_LOGGER.warn("If it does crash, disable Distant Generation or set the Generation Mode to ["+EDhApiWorldGenerationStep.EMPTY+"].");
EVENT_LOGGER.warn("If it does crash, disable Distant Generation or set the Generation Mode to ["+EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY+"].");
}
}
@@ -309,7 +355,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
private static ProtoChunk EmptyChunk(ServerLevel level, ChunkPos chunkPos) {
return new ProtoChunk(chunkPos, UpgradeData.EMPTY
#if POST_MC_1_17_1, level #endif
#if POST_MC_1_18_1, level.registryAccess().registryOrThrow(
#if POST_MC_1_18_2, level.registryAccess().registryOrThrow(
#if PRE_MC_1_19_4
Registry.BIOME_REGISTRY
#else
@@ -357,20 +403,29 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
}
}
}
private static ArrayGridList<ChunkAccess> GetCutoutFrom(ArrayGridList<ChunkAccess> total, int border) {
return new ArrayGridList<>(total, border, total.gridSize - border);
}
private static ArrayGridList<ChunkAccess> GetCutoutFrom(ArrayGridList<ChunkAccess> total, EDhApiWorldGenerationStep step) {
return GetCutoutFrom(total, MaxBorderNeeded - BorderNeeded.get(step));
}
public void generateLodFromList(GenerationEvent genEvent) throws InterruptedException
{
EVENT_LOGGER.debug("Lod Generate Event: "+genEvent.minPos);
ArrayGridList<ChunkAccess> referencedChunks;
ArrayGridList<ChunkAccess> genChunks;
ArrayGridList<ChunkAccess> totalChunks;
ArrayGridList<ChunkAccess> finalGenChunks;
LightedWorldGenRegion region;
WorldGenLevelLightEngine lightEngine;
LightGetterAdaptor adaptor;
int refSize = genEvent.size+2; // +2 for the border referenced chunks
int refPosX = genEvent.minPos.x - 1; // -1 for the border referenced chunks
int refPosZ = genEvent.minPos.z - 1; // -1 for the border referenced chunks
int borderSize = MaxBorderNeeded;
int refSize = genEvent.size + borderSize * 2;
int refPosX = genEvent.minPos.x - borderSize;
int refPosZ = genEvent.minPos.z - borderSize;
try
{
@@ -394,22 +449,20 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
{
target = new ProtoChunk(chunkPos, UpgradeData.EMPTY
#if POST_MC_1_17_1 , params.level #endif
#if POST_MC_1_18_1 , params.biomes, null #endif
#if POST_MC_1_18_2 , params.biomes, null #endif
);
}
return target;
};
referencedChunks = new ArrayGridList<>(refSize, (x,z) -> generator.generate(x + refPosX,z + refPosZ));
totalChunks = new ArrayGridList<>(refSize, (x,z) -> generator.generate(x + refPosX,z + refPosZ));
genEvent.refreshTimeout();
region = new LightedWorldGenRegion(params.level, lightEngine, referencedChunks,
region = new LightedWorldGenRegion(params.level, lightEngine, totalChunks,
ChunkStatus.STRUCTURE_STARTS, refSize/2, generator);
adaptor.setRegion(region);
genEvent.threadedParam.makeStructFeat(region, params);
genChunks = new ArrayGridList<>(referencedChunks, RANGE_TO_RANGE_EMPTY_EXTENSION,
referencedChunks.gridSize - RANGE_TO_RANGE_EMPTY_EXTENSION);
this.generateDirect(genEvent, genChunks, genEvent.targetGenerationStep, region);
this.generateDirect(genEvent, totalChunks, borderSize, genEvent.targetGenerationStep, region);
genEvent.timer.nextEvent("cleanup");
}
catch (StepStructureStart.StructStartCorruptedException f)
@@ -417,12 +470,13 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.threadedParam.markAsInvalid();
throw (RuntimeException)f.getCause();
}
for (int offsetY = 0; offsetY < genChunks.gridSize; offsetY++)
finalGenChunks = GetCutoutFrom(totalChunks, borderSize);
for (int offsetY = 0; offsetY < finalGenChunks.gridSize; offsetY++)
{
for (int offsetX = 0; offsetX < genChunks.gridSize; offsetX++)
for (int offsetX = 0; offsetX < finalGenChunks.gridSize; offsetX++)
{
ChunkAccess target = genChunks.get(offsetX, offsetY);
ChunkAccess target = finalGenChunks.get(offsetX, offsetY);
ChunkWrapper wrappedChunk = new ChunkWrapper(target, region, null);
if (target instanceof LevelChunk) {
((LevelChunk) target).loaded = true;
@@ -433,7 +487,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
}
boolean isFull = target.getStatus() == ChunkStatus.FULL || target instanceof LevelChunk;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
boolean isPartial = target.isOldNoiseGeneration();
#endif
if (isFull)
@@ -441,7 +495,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
LOAD_LOGGER.info("Detected full existing chunk at {}", target.getPos());
genEvent.resultConsumer.accept(wrappedChunk);
}
#if POST_MC_1_18_1
#if POST_MC_1_18_2
else if (isPartial)
{
LOAD_LOGGER.info("Detected old existing chunk at {}", target.getPos());
@@ -472,7 +526,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
}
}
public void generateDirect(GenerationEvent genEvent, ArrayGridList<ChunkAccess> chunksToGenerate,
public void generateDirect(GenerationEvent genEvent, ArrayGridList<ChunkAccess> chunksToGenerate, int border,
EDhApiWorldGenerationStep step, LightedWorldGenRegion region) throws InterruptedException
{
if (Thread.interrupted())
@@ -500,7 +554,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.timer.nextEvent("structStart");
throwIfThreadInterrupted();
stepStructureStart.generateGroup(genEvent.threadedParam, region, chunksToGenerate);
stepStructureStart.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.STRUCTURE_START));
genEvent.refreshTimeout();
if (step == EDhApiWorldGenerationStep.STRUCTURE_START)
{
@@ -509,7 +563,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.timer.nextEvent("structRef");
throwIfThreadInterrupted();
stepStructureReference.generateGroup(genEvent.threadedParam, region, chunksToGenerate);
stepStructureReference.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.STRUCTURE_REFERENCE));
genEvent.refreshTimeout();
if (step == EDhApiWorldGenerationStep.STRUCTURE_REFERENCE)
{
@@ -518,7 +572,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.timer.nextEvent("biome");
throwIfThreadInterrupted();
stepBiomes.generateGroup(genEvent.threadedParam, region, chunksToGenerate);
stepBiomes.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.BIOMES));
genEvent.refreshTimeout();
if (step == EDhApiWorldGenerationStep.BIOMES)
{
@@ -527,7 +581,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.timer.nextEvent("noise");
throwIfThreadInterrupted();
stepNoise.generateGroup(genEvent.threadedParam, region, chunksToGenerate);
stepNoise.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.NOISE));
genEvent.refreshTimeout();
if (step == EDhApiWorldGenerationStep.NOISE)
{
@@ -536,7 +590,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.timer.nextEvent("surface");
throwIfThreadInterrupted();
stepSurface.generateGroup(genEvent.threadedParam, region, chunksToGenerate);
stepSurface.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.SURFACE));
genEvent.refreshTimeout();
if (step == EDhApiWorldGenerationStep.SURFACE)
{
@@ -552,7 +606,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
genEvent.timer.nextEvent("feature");
throwIfThreadInterrupted();
stepFeatures.generateGroup(genEvent.threadedParam, region, chunksToGenerate);
stepFeatures.generateGroup(genEvent.threadedParam, region, GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.FEATURES));
genEvent.refreshTimeout();
}
finally
@@ -566,7 +620,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
if (!Thread.interrupted())
{
this.stepLight.generateGroup(region.getLightEngine(), chunksToGenerate);
this.stepLight.generateGroup(region.getLightEngine(), GetCutoutFrom(chunksToGenerate, EDhApiWorldGenerationStep.LIGHT));
}
}
else
@@ -582,7 +636,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
// that though is no longer needed...
}
#if POST_MC_1_18_1
#if POST_MC_1_18_2
if (chunk instanceof LevelChunk)
{
LevelChunk levelChunk = (LevelChunk) chunk;
@@ -31,16 +31,16 @@ import net.minecraft.server.level.ThreadedLevelLightEngine;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.BiomeManager;
import net.minecraft.world.level.chunk.ChunkGenerator;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.world.level.chunk.storage.ChunkScanAccess;
#endif
import net.minecraft.world.level.levelgen.WorldGenSettings;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager;
#else
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
import net.minecraft.world.level.levelgen.RandomState;
#if POST_MC_1_19
#if POST_MC_1_19_4
import net.minecraft.world.level.levelgen.WorldOptions;
import net.minecraft.core.registries.Registries;
#endif
@@ -50,7 +50,7 @@ import net.minecraft.world.level.storage.WorldData;
public final class GlobalParameters
{
public final ChunkGenerator generator;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public final StructureManager structures;
#else
public final StructureTemplateManager structures;
@@ -68,7 +68,7 @@ public final class GlobalParameters
public final RegistryAccess registry;
public final long worldSeed;
public final DataFixer fixerUpper;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
public final BiomeManager biomeManager;
public final ChunkScanAccess chunkScanner; // FIXME: Figure out if this is actually needed
#endif
@@ -92,14 +92,14 @@ public final class GlobalParameters
biomes = registry.registryOrThrow(Registries.BIOME);
worldSeed = worldOptions.seed();
#endif
#if POST_MC_1_18_1
#if POST_MC_1_18_2
biomeManager = new BiomeManager(level, BiomeManager.obfuscateSeed(worldSeed));
chunkScanner = level.getChunkSource().chunkScanner();
#endif
structures = server.getStructureManager();
generator = level.getChunkSource().getGenerator();
fixerUpper = server.getFixerUpper();
#if POST_MC_1_19
#if POST_MC_1_19_2
randomState = level.getChunkSource().randomState();
#endif
}
@@ -25,7 +25,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.mimicObject.Wo
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.WorldGenLevel;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.world.level.levelgen.structure.StructureCheck;
#endif
@@ -35,7 +35,7 @@ public final class ThreadedParameters
final ServerLevel level;
public WorldGenStructFeatManager structFeat = null;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
public StructureCheck structCheck;
#endif
boolean isValid = true;
@@ -63,9 +63,9 @@ public final class ThreadedParameters
previousGlobalParameters = param;
this.level = param.level;
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
this.structFeat = new WorldGenStructFeatManager(param.worldGenSettings, level);
#elif PRE_MC_1_19
#elif PRE_MC_1_19_2
this.structCheck = this.createStructureCheck(param);
#else
this.structCheck = new StructureCheck(param.chunkScanner, param.registry, param.structures,
@@ -81,14 +81,14 @@ public final class ThreadedParameters
public void makeStructFeat(WorldGenLevel genLevel, GlobalParameters param)
{
#if PRE_MC_1_19_4
structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if POST_MC_1_18_1, structCheck #endif);
structFeat = new WorldGenStructFeatManager(param.worldGenSettings, genLevel #if POST_MC_1_18_2, structCheck #endif);
#else
structFeat = new WorldGenStructFeatManager(param.worldOptions, genLevel, structCheck);
#endif
}
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public void recreateStructureCheck()
{
if (previousGlobalParameters != null)
@@ -54,9 +54,9 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.*;
import net.minecraft.world.level.chunk.storage.ChunkSerializer;
import net.minecraft.world.level.levelgen.Heightmap;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.world.level.levelgen.blending.BlendingData;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.world.level.levelgen.feature.StructureFeature;
#endif
import net.minecraft.world.level.levelgen.structure.StructureStart;
@@ -66,7 +66,7 @@ import net.minecraft.world.ticks.LevelChunkTicks;
#if POST_MC_1_18_2
import net.minecraft.core.Holder;
import net.minecraft.core.RegistryAccess;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
#endif
#endif
@@ -78,9 +78,9 @@ import org.apache.logging.log4j.Logger;
public class ChunkLoader
{
#if POST_MC_1_19
#if POST_MC_1_19_2
private static final Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState());
#elif POST_MC_1_18_1
#elif POST_MC_1_18_2
private static final Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState());
#endif
private static final String TAG_UPGRADE_DATA = "UpgradeData";
@@ -90,7 +90,7 @@ public class ChunkLoader
private static final String FLUID_TICKS_TAG_PRE18 = "LiquidTicks";
private static final ConfigBasedLogger LOGGER = BatchGenerationEnvironment.LOAD_LOGGER;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
private static BlendingData readBlendingData(CompoundTag chunkData)
{
BlendingData blendingData = null;
@@ -106,7 +106,7 @@ public class ChunkLoader
private static LevelChunkSection[] readSections(LevelAccessor level, LevelLightEngine lightEngine, ChunkPos chunkPos, CompoundTag chunkData)
{
#if POST_MC_1_18_1
#if POST_MC_1_18_2
#if PRE_MC_1_19_4
Registry<Biome> biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
#else
@@ -115,7 +115,7 @@ public class ChunkLoader
#if PRE_MC_1_18_2
Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(
biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS));
#elif PRE_MC_1_19
#elif PRE_MC_1_19_2
Codec<PalettedContainer<Holder<Biome>>> biomeCodec = PalettedContainer.codec(
biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS));
#else
@@ -136,7 +136,7 @@ public class ChunkLoader
CompoundTag tagSection = tagSections.getCompound(j);
int sectionYPos = tagSection.getByte("Y");
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
if (tagSection.contains("Palette", 9) && tagSection.contains("BlockStates", 12)) {
LevelChunkSection levelChunkSection = new LevelChunkSection(sectionYPos << 4);
levelChunkSection.getStates().read(tagSection.getList("Palette", 10),
@@ -225,7 +225,7 @@ public class ChunkLoader
public static LevelChunk read(WorldGenLevel level, LevelLightEngine lightEngine, ChunkPos chunkPos, CompoundTag chunkData)
{
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
CompoundTag tagLevel = chunkData.getCompound("Level");
#else
CompoundTag tagLevel = chunkData;
@@ -238,12 +238,12 @@ public class ChunkLoader
}
ChunkStatus.ChunkType chunkType = readChunkType(tagLevel);
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
if (chunkType != ChunkStatus.ChunkType.LEVELCHUNK)
return null;
#else
BlendingData blendingData = readBlendingData(tagLevel);
#if PRE_MC_1_19
#if PRE_MC_1_19_2
if (chunkType == ChunkStatus.ChunkType.PROTOCHUNK && (blendingData == null || !blendingData.oldNoise()))
return null;
#else
@@ -261,7 +261,7 @@ public class ChunkLoader
boolean isLightOn = tagLevel.getBoolean("isLightOn");
if (isLightOn) lightEngine.retainData(chunkPos, true);
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
ChunkBiomeContainer chunkBiomeContainer = new ChunkBiomeContainer(
level.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY)#if POST_MC_1_17_1, level #endif,
chunkPos, level.getLevel().getChunkSource().getGenerator().getBiomeSource(),
@@ -293,7 +293,7 @@ public class ChunkLoader
LevelChunkSection[] levelChunkSections = readSections(level, lightEngine, chunkPos, tagLevel);
// ====================== Make the chunk =========================
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
LevelChunk chunk = new LevelChunk((Level) level.getLevel(), chunkPos, chunkBiomeContainer, upgradeData, blockTicks,
fluidTicks, inhabitedTime, levelChunkSections, null);
#else
@@ -66,7 +66,7 @@ public class LightedWorldGenRegion extends WorldGenRegion
private final List<ChunkAccess> cache;
Long2ObjectOpenHashMap<ChunkAccess> chunkMap = new Long2ObjectOpenHashMap<ChunkAccess>();
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
private ChunkPos overrideCenterPos = null;
public void setOverrideCenter(ChunkPos pos) {overrideCenterPos = pos;}
@@ -114,7 +114,7 @@ public class LightedWorldGenRegion extends WorldGenRegion
if (k > this.writeRadius || l > this.writeRadius) {
return false;
}
#if POST_MC_1_18_1
#if POST_MC_1_18_2
if (center.isUpgrading()) {
LevelHeightAccessor levelHeightAccessor = center.getHeightAccessorForGeneration();
if (blockPos.getY() < levelHeightAccessor.getMinBuildHeight() || blockPos.getY() >= levelHeightAccessor.getMaxBuildHeight()) {
@@ -208,7 +208,7 @@ public class LightedWorldGenRegion extends WorldGenRegion
}
// Use this instead of super.hasChunk() to bypass C2ME concurrency checks
private boolean superHasChunk(int x, int z) {
public boolean superHasChunk(int x, int z) {
int k = x - firstPos.x;
int l = z - firstPos.z;
return l >= 0 && l < size && k >= 0 && k < size;
@@ -220,7 +220,7 @@ public class LightedWorldGenRegion extends WorldGenRegion
public ChunkAccess getChunk(int i, int j, ChunkStatus chunkStatus, boolean bl) {
ChunkAccess chunk = getChunkAccess(i, j, chunkStatus, bl);
if (chunk instanceof LevelChunk) {
chunk = new ImposterProtoChunk((LevelChunk) chunk #if POST_MC_1_18_1, true #endif);
chunk = new ImposterProtoChunk((LevelChunk) chunk #if POST_MC_1_18_2, true #endif);
}
return chunk;
}
@@ -284,7 +284,7 @@ public class LightedWorldGenRegion extends WorldGenRegion
public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver)
{
#if PRE_MC_1_19
#if PRE_MC_1_19_2
int i = (Minecraft.getInstance()).options.biomeBlendRadius;
#else
int i = (Minecraft.getInstance()).options.biomeBlendRadius().get();
@@ -221,7 +221,7 @@ public class WorldGenLevelLightEngine extends LevelLightEngine {
if (!LevelChunkSection.isEmpty(levelChunkSection)) {
updateSectionStatus(SectionPos.of(chunkPos, i), false);
}
#elif PRE_MC_1_18_1
#elif PRE_MC_1_18_2
if (!LevelChunkSection.isEmpty(levelChunkSection)) {
int j = this.levelHeightAccessor.getSectionYFromSectionIndex(i);
updateSectionStatus(SectionPos.of(chunkPos, j), false);
@@ -37,41 +37,43 @@ import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.levelgen.WorldGenSettings;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
import net.minecraft.world.level.StructureFeatureManager;
#else
#if POST_MC_1_19_4
import net.minecraft.world.level.levelgen.WorldOptions;
#endif
import net.minecraft.world.level.levelgen.structure.Structure;
import net.minecraft.world.level.StructureManager;
#endif
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.world.level.levelgen.structure.StructureCheck;
#endif
import net.minecraft.world.level.levelgen.structure.StructureStart;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public class WorldGenStructFeatManager extends StructureFeatureManager {
#else
public class WorldGenStructFeatManager extends StructureManager {
#endif
final WorldGenLevel genLevel;
#if PRE_MC_1_19
#if PRE_MC_1_19_4
WorldGenSettings worldGenSettings;
#else
WorldOptions worldOptions;
#endif
#if POST_MC_1_18_1
#if POST_MC_1_18_2
StructureCheck structureCheck;
#endif
#if PRE_MC_1_19
#if PRE_MC_1_19_4
public WorldGenStructFeatManager(WorldGenSettings worldGenSettings,
WorldGenLevel genLevel #if POST_MC_1_18_1 , StructureCheck structureCheck #endif ) {
WorldGenLevel genLevel #if POST_MC_1_18_2 , StructureCheck structureCheck #endif ) {
super(genLevel, worldGenSettings #if POST_MC_1_18_1 , structureCheck #endif );
super(genLevel, worldGenSettings #if POST_MC_1_18_2 , structureCheck #endif );
this.genLevel = genLevel;
this.worldGenSettings = worldGenSettings;
}
@@ -89,8 +91,8 @@ public class WorldGenStructFeatManager extends StructureManager {
public WorldGenStructFeatManager forWorldGenRegion(WorldGenRegion worldGenRegion) {
if (worldGenRegion == genLevel)
return this;
#if PRE_MC_1_19
return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if POST_MC_1_18_1 , structureCheck #endif );
#if PRE_MC_1_19_4
return new WorldGenStructFeatManager(worldGenSettings, worldGenRegion #if POST_MC_1_18_2 , structureCheck #endif );
#else
return new WorldGenStructFeatManager(worldOptions, worldGenRegion, structureCheck);
#endif
@@ -101,7 +103,7 @@ public class WorldGenStructFeatManager extends StructureManager {
return genLevel.getChunk(x, z, status, false);
}
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
@Override
public Stream<? extends StructureStart<?>> startsForFeature(SectionPos sectionPos2,
StructureFeature<?> structureFeature) {
@@ -149,7 +151,7 @@ public class WorldGenStructFeatManager extends StructureManager {
return builder.build();
}
#else
#if PRE_MC_1_19
#if PRE_MC_1_19_2
@Override
public List<StructureStart> startsForFeature(SectionPos sectionPos, Predicate<ConfiguredStructureFeature<?, ?>> predicate) {
ChunkAccess chunk = _getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES);
@@ -26,12 +26,12 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGeneratio
import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParameters;
import net.minecraft.server.level.WorldGenRegion;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
#endif
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.ProtoChunk;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.world.level.levelgen.blending.Blender;
#endif
@@ -64,12 +64,12 @@ public final class StepBiomes {
for (ChunkAccess chunk : chunksToDo) {
// System.out.println("StepBiomes: "+chunk.getPos());
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
environment.params.generator.createBiomes(environment.params.biomes, chunk);
#elif PRE_MC_1_19
#elif PRE_MC_1_19_2
chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, Blender.of(worldGenRegion),
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
#elif PRE_MC_1_19_3
#elif PRE_MC_1_19_4
chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, environment.params.randomState, Blender.of(worldGenRegion),
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
#else
@@ -31,7 +31,7 @@ import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.ProtoChunk;
import net.minecraft.world.level.levelgen.Heightmap;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
#endif
public final class StepFeatures {
@@ -62,14 +62,16 @@ public final class StepFeatures {
for (ChunkAccess chunk : chunksToDo) {
try {
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
worldGenRegion.setOverrideCenter(chunk.getPos());
environment.params.generator.applyBiomeDecoration(worldGenRegion, tParams.structFeat);
Heightmap.primeHeightmaps(chunk, STATUS.heightmapsAfter());
BatchGenerationEnvironment.clearDistantGenerationMixinData();
#else
environment.params.generator.applyBiomeDecoration(worldGenRegion, chunk,
tParams.structFeat.forWorldGenRegion(worldGenRegion));
Heightmap.primeHeightmaps(chunk, STATUS.heightmapsAfter());
BatchGenerationEnvironment.clearDistantGenerationMixinData();
#endif
} catch (ReportedException e) {
e.printStackTrace();
@@ -72,7 +72,7 @@ public final class StepLight {
} catch (Exception e) {
e.printStackTrace();
}
#if POST_MC_1_18_1 && PRE_MC_1_20_1
#if POST_MC_1_18_2 && PRE_MC_1_20_1
if (chunk instanceof LevelChunk) ((LevelChunk)chunk).setClientLightReady(true);
#elif POST_MC_1_20_1
lightEngine.setLightEnabled(chunk.getPos(), true);
@@ -29,12 +29,12 @@ import com.seibel.distanthorizons.core.util.objects.UncheckedInterruptedExceptio
import net.minecraft.server.level.WorldGenRegion;
#if POST_MC_1_17_1
#endif
#if PRE_MC_1_19
#if PRE_MC_1_19_2
#endif
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.ProtoChunk;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.world.level.levelgen.blending.Blender;
#endif
@@ -69,10 +69,10 @@ public final class StepNoise {
// System.out.println("StepNoise: "+chunk.getPos());
#if PRE_MC_1_17_1
environment.params.generator.fillFromNoise(worldGenRegion, tParams.structFeat, chunk);
#elif PRE_MC_1_18_1
#elif PRE_MC_1_18_2
chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run,
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
#elif PRE_MC_1_19
#elif PRE_MC_1_19_2
chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, Blender.of(worldGenRegion),
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
#else
@@ -26,7 +26,7 @@ import com.seibel.distanthorizons.common.wrappers.worldGeneration.BatchGeneratio
import com.seibel.distanthorizons.common.wrappers.worldGeneration.ThreadedParameters;
import net.minecraft.server.level.WorldGenRegion;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
#endif
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
@@ -72,18 +72,20 @@ public final class StepStructureStart
}
}
#if PRE_MC_1_19
#if PRE_MC_1_19_2
if (environment.params.worldGenSettings.generateFeatures()) {
#elif POST_MC_1_19
#elif PRE_MC_1_19_4
if (environment.params.worldGenSettings.generateStructures()) {
#else
if (environment.params.worldOptions.generateStructures()) {
#endif
for (ChunkAccess chunk : chunksToDo)
{
// System.out.println("StepStructureStart: "+chunk.getPos());
#if PRE_MC_1_19
#if PRE_MC_1_19_2
environment.params.generator.createStructures(environment.params.registry, tParams.structFeat, chunk, environment.params.structures,
environment.params.worldSeed);
#elif PRE_MC_1_19_3
#elif PRE_MC_1_19_4
environment.params.generator.createStructures(environment.params.registry, environment.params.randomState, tParams.structFeat, chunk, environment.params.structures,
environment.params.worldSeed);
#else
@@ -91,7 +93,7 @@ public final class StepStructureStart
environment.params.level.getChunkSource().getGeneratorState(),
tParams.structFeat, chunk, environment.params.structures);
#endif
#if POST_MC_1_18_1
#if POST_MC_1_18_2
try
{
tParams.structCheck.onStructureLoad(chunk.getPos(), chunk.getAllStarts());
@@ -58,9 +58,9 @@ public final class StepSurface {
for (ChunkAccess chunk : chunksToDo) {
// System.out.println("StepSurface: "+chunk.getPos());
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
environment.params.generator.buildSurfaceAndBedrock(worldGenRegion, chunk);
#elif PRE_MC_1_19
#elif PRE_MC_1_19_2
environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk);
#else
environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), environment.params.randomState, chunk);
@@ -0,0 +1,39 @@
accessWidener v1 named
# used when determining where to save files to
accessible field net/minecraft/world/level/storage/DimensionDataStorage dataFolder Ljava/io/File;
# used when rendering
accessible method net/minecraft/client/renderer/GameRenderer getFov (Lnet/minecraft/client/Camera;FZ)D
# used for grabbing vanilla rendered chunks
accessible field net/minecraft/client/renderer/LevelRenderer renderChunkStorage Ljava/util/concurrent/atomic/AtomicReference;
accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkStorage
accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo
accessible field net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo chunk Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk;
# world generation
accessible method net/minecraft/world/level/lighting/LayerLightEngine queueSectionData (JLnet/minecraft/world/level/chunk/DataLayer;Z)V
accessible field net/minecraft/world/level/chunk/LevelChunk loaded Z
# lod generation from save file
accessible field net/minecraft/world/level/chunk/storage/ChunkStorage worker Lnet/minecraft/world/level/chunk/storage/IOWorker;
accessible field net/minecraft/world/level/chunk/storage/IOWorker storage Lnet/minecraft/world/level/chunk/storage/RegionFileStorage;
accessible field net/minecraft/world/level/chunk/storage/RegionFileStorage regionCache Lit/unimi/dsi/fastutil/longs/Long2ObjectLinkedOpenHashMap;
accessible field net/minecraft/world/level/chunk/storage/RegionFileStorage folder Ljava/nio/file/Path;
# grabbing textures
accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite animatedTexture Lnet/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture;
accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite width I
accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite height I
accessible field net/minecraft/client/renderer/texture/TextureAtlasSprite mainImage [Lcom/mojang/blaze3d/platform/NativeImage;
accessible class net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture
accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameX (I)I
accessible method net/minecraft/client/renderer/texture/TextureAtlasSprite$AnimatedTexture getFrameY (I)I
extendable class com/mojang/math/Matrix4f
# hacky stuff
accessible field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore;
mutable field net/minecraft/util/ThreadingDetector lock Ljava/util/concurrent/Semaphore;
accessible field net/minecraft/client/gui/components/AbstractSelectionList scrollAmount D # Hack to bypass vanilla's setScrollAmount's clamp
@@ -98,7 +98,7 @@ public class FabricClientProxy
// ClientChunkLoadEvent
// TODO: Is using setClientLightReady one still better?
//#if PRE_MC_1_18_1 // in 1.18+, we use mixin hook in setClientLightReady(true)
//#if PRE_MC_1_18_2 // in 1.18+, we use mixin hook in setClientLightReady(true)
ClientChunkEvents.CHUNK_LOAD.register((level, chunk) ->
{
IClientLevelWrapper wrappedLevel = ClientLevelWrapper.getWrapper(level);
@@ -44,13 +44,13 @@ public class MixinClientLevel
// @Inject(method = "<init>", at = @At("TAIL"))
// private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey,
// #if POST_MC_1_18_2 Holder holder, #else DimensionType dimensionType, #endif int i,
// #if POST_MC_1_18_1 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci)
// #if POST_MC_1_18_2 int j, #endif Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci)
// {
// ClientApi.INSTANCE.clientLevelLoadEvent(WorldWrapper.getWorldWrapper((ClientLevel)(Object)this));
// }
// Moved to overriding the enableChunkLight(...) method over at ClientPacketListener for 1.20+
#if POST_MC_1_18_1 && PRE_MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready.
#if POST_MC_1_18_2 && PRE_MC_1_20_1 // Only the setLightReady is only available after 1.18. This ensures the light data is ready.
@Inject(method = "setLightReady", at = @At("HEAD"))
private void onChunkLightReady(int x, int z, CallbackInfo ci)
{
@@ -40,7 +40,7 @@ public class MixinClientPacketListener
@Inject(method = "handleRespawn", at = @At("RETURN"))
void onHandleRespawnEnd(CallbackInfo ci) { ClientApi.INSTANCE.clientLevelLoadEvent(ClientLevelWrapper.getWrapper(level)); }
#if PRE_MC_1_19
#if PRE_MC_1_19_4
@Inject(method = "cleanup", at = @At("HEAD"))
#else
@Inject(method = "close", at = @At("HEAD"))
@@ -47,7 +47,7 @@ public class MixinFogRenderer {
private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F;
@Inject(at = @At("RETURN"), method = "setupFog")
#if PRE_MC_1_19
#if PRE_MC_1_19_2
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) {
#else
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float g, CallbackInfo callback) {
@@ -1,5 +1,6 @@
package com.seibel.distanthorizons.fabric.mixins.client;
import com.seibel.distanthorizons.common.wrappers.DependencySetupDoneCheck;
import com.seibel.distanthorizons.core.api.internal.ClientApi;
import net.minecraft.client.renderer.GameRenderer;
import org.apache.logging.log4j.LogManager;
@@ -18,14 +19,22 @@ public class MixinGameRenderer
#if POST_MC_1_17_1
@Inject(method = "shutdownShaders", at = @At("HEAD"))
public void onShutdownShaders(CallbackInfo ci) {
LOGGER.info("Shutting down renderer");
LOGGER.info("Shutting down renderer (fabric)");
if (!DependencySetupDoneCheck.isDone) {
LOGGER.warn("Dependency setup is not done yet, skipping renderer this shutdown event!");
return;
}
ClientApi.INSTANCE.rendererShutdownEvent();
}
// FIXME: This I think will dup multiple renderStartupEvent calls...
@Inject(method = {"reloadShaders", "preloadUiShader", "preloadShader"}, at = @At("TAIL"))
@Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL"))
public void onStartupShaders(CallbackInfo ci) {
LOGGER.info("Starting up renderer");
LOGGER.info("Starting up renderer (fabric)");
if (!DependencySetupDoneCheck.isDone) {
LOGGER.warn("Dependency setup is not done yet, skipping renderer this startup event!");
return;
}
ClientApi.INSTANCE.rendererStartupEvent();
}
#else
@@ -26,7 +26,7 @@ import com.seibel.distanthorizons.core.config.Config;
import net.minecraft.client.gui.screens.OptionsScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.network.chat.TranslatableComponent;
#endif
import net.minecraft.resources.ResourceLocation;
@@ -68,7 +68,7 @@ public class MixinOptionsScreen extends Screen {
// For now it goes to the client option by default
(buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(GetConfigScreen.getScreen(this)),
// Add a title to the utton
#if PRE_MC_1_19
#if PRE_MC_1_19_2
new TranslatableComponent(ModInfo.ID + ".title")));
#else
Component.translatable(ModInfo.ID + ".title")));
@@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.world.level.chunk.ChunkGenerator;
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@@ -61,7 +61,7 @@ public class MixinUtilBackgroundThread
}
}
#endif
#if POST_MC_1_18_1
#if POST_MC_1_18_2
@Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;",
at = @At("HEAD"), cancellable = true)
private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier<?> r, CallbackInfoReturnable<Supplier<?>> ci)
@@ -22,7 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.server.unsafe;
import org.spongepowered.asm.mixin.Mixin;
//FIXME: Is this still needed?
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.util.ThreadingDetector;
import org.spongepowered.asm.mixin.Mutable;
@@ -64,7 +64,7 @@ public class SodiumAccessor implements ISodiumAccessor {
SodiumWorldRenderer renderer = SodiumWorldRenderer.instance();
LevelHeightAccessor height = Minecraft.getInstance().level;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
// 0b11 = Lighted chunk & loaded chunk
return renderer.getChunkTracker().getChunks(0b00).filter(
(long l) -> {
+2
View File
@@ -85,6 +85,8 @@ dependencies {
addMod("curse.maven:TerraForged-363820:${rootProject.terraforged_version}", rootProject.enable_terraforged)
addMod("curse.maven:TerraFirmaCraft-302973:4616004", rootProject.enable_terrafirmacraft)
// if (System.getProperty("idea.sync.active") != "true") {
// annotationProcessor "org.spongepowered:mixin:0.8.4:processor"
// }
@@ -27,7 +27,7 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.chunk.IChunkWrapper;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.client.multiplayer.ClientLevel;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraftforge.event.world.ChunkEvent;
import net.minecraftforge.event.world.WorldEvent;
#else
@@ -54,7 +54,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
*/
public class ForgeClientProxy
{
#if PRE_MC_1_19
#if PRE_MC_1_19_2
private static LevelAccessor GetLevel(WorldEvent e) { return e.getWorld(); }
#else
private static LevelAccessor GetLevel(LevelEvent e) { return e.getLevel(); }
@@ -117,7 +117,7 @@ public class ForgeClientProxy
// Register KeyBindings
@SubscribeEvent
public void registerKeyBindings(#if PRE_MC_1_19 InputEvent.KeyInputEvent #else InputEvent.Key #endif event)
public void registerKeyBindings(#if PRE_MC_1_19_2 InputEvent.KeyInputEvent #else InputEvent.Key #endif event)
{
if (Minecraft.getInstance().player == null) return;
if (event.getAction() != GLFW.GLFW_PRESS) return;
@@ -38,7 +38,7 @@ import com.seibel.distanthorizons.forge.wrappers.modAccessor.OptifineAccessor;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.core.Direction;
#if POST_MC_1_19
#if POST_MC_1_19_2
import net.minecraft.util.RandomSource;
#endif
import net.minecraft.world.level.ColorResolver;
@@ -54,7 +54,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.fml.ExtensionPoint;
#elif MC_1_17_1
import net.minecraftforge.fmlclient.ConfigGuiHandler;
#elif POST_MC_1_18_2 && PRE_MC_1_19
#elif POST_MC_1_18_2 && PRE_MC_1_19_2
import net.minecraftforge.client.ConfigGuiHandler;
#else
import net.minecraftforge.client.ConfigScreenHandler;
@@ -63,7 +63,7 @@ import net.minecraftforge.client.ConfigScreenHandler;
import org.apache.logging.log4j.Logger;
// these imports change due to forge refactoring classes in 1.19
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraftforge.client.model.data.ModelDataMap;
import java.util.Random;
#else
@@ -124,7 +124,7 @@ public class ForgeMain implements LodForgeMethodCaller
#if PRE_MC_1_17_1
ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY,
() -> (client, parent) -> GetConfigScreen.getScreen(parent));
#elif POST_MC_1_18_2 && PRE_MC_1_19
#elif POST_MC_1_18_2 && PRE_MC_1_19_2
ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class,
() -> new ConfigGuiHandler.ConfigGuiFactory((client, parent) -> GetConfigScreen.getScreen(parent)));
#else
@@ -168,13 +168,13 @@ public class ForgeMain implements LodForgeMethodCaller
#endif
@Override
#if PRE_MC_1_19
#if PRE_MC_1_19_2
public List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random) {
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData);
}
#else
public List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random) {
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if POST_MC_1_19, RenderType.solid() #endif);
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if POST_MC_1_19_2, RenderType.solid() #endif);
}
#endif
@@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelAccessor;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.server.ServerAboutToStartEvent;
import net.minecraftforge.event.server.ServerStoppingEvent;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraftforge.event.world.ChunkEvent;
import net.minecraftforge.event.world.WorldEvent;
#else
@@ -31,7 +31,7 @@ import java.util.function.Supplier;
public class ForgeServerProxy
{
#if PRE_MC_1_19
#if PRE_MC_1_19_2
private static LevelAccessor GetLevel(WorldEvent e) { return e.getWorld(); }
#else
private static LevelAccessor GetLevel(LevelEvent e) { return e.getLevel(); }
@@ -38,7 +38,7 @@ public class MixinClientPacketListener
@Inject(method = "handleRespawn", at = @At("RETURN"))
void onHandleRespawnEnd(CallbackInfo ci) { ClientApi.INSTANCE.clientLevelLoadEvent(ClientLevelWrapper.getWrapper(level)); }
#if PRE_MC_1_19
#if PRE_MC_1_19_4
@Inject(method = "cleanup", at = @At("HEAD"))
#else
@Inject(method = "close", at = @At("HEAD"))
@@ -1,5 +1,6 @@
package com.seibel.distanthorizons.forge.mixins.client;
import com.seibel.distanthorizons.common.wrappers.DependencySetupDoneCheck;
import com.seibel.distanthorizons.core.api.internal.ClientApi;
import net.minecraft.client.renderer.GameRenderer;
import org.apache.logging.log4j.LogManager;
@@ -18,14 +19,22 @@ public class MixinGameRenderer
#if POST_MC_1_17_1
@Inject(method = "shutdownShaders", at = @At("HEAD"))
public void onShutdownShaders(CallbackInfo ci) {
LOGGER.info("Shutting down renderer");
LOGGER.info("Shutting down renderer (forge)");
if (!DependencySetupDoneCheck.isDone) {
LOGGER.warn("Dependency setup is not done yet, skipping renderer this shutdown event!");
return;
}
ClientApi.INSTANCE.rendererShutdownEvent();
}
// FIXME: This I think will dup multiple renderStartupEvent calls...
@Inject(method = {"reloadShaders", "preloadUiShader", "preloadShader"}, at = @At("TAIL"))
@Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL"))
public void onStartupShaders(CallbackInfo ci) {
LOGGER.info("Starting up renderer");
LOGGER.info("Starting up renderer (forge)");
if (!DependencySetupDoneCheck.isDone) {
LOGGER.warn("Dependency setup is not done yet, skipping renderer this startup event!");
return;
}
ClientApi.INSTANCE.rendererStartupEvent();
}
#else
@@ -26,7 +26,7 @@ import com.seibel.distanthorizons.core.config.Config;
import net.minecraft.client.gui.screens.OptionsScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
#if PRE_MC_1_19
#if PRE_MC_1_19_2
import net.minecraft.network.chat.TranslatableComponent;
#endif
import net.minecraft.resources.ResourceLocation;
@@ -68,7 +68,7 @@ public class MixinOptionsScreen extends Screen {
// For now it goes to the client option by default
(buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(GetConfigScreen.getScreen(this)),
// Add a title to the button
#if PRE_MC_1_19
#if PRE_MC_1_19_2
new TranslatableComponent(ModInfo.ID + ".title")));
#else
Component.translatable(ModInfo.ID + ".title")));
@@ -22,7 +22,7 @@ package com.seibel.distanthorizons.forge.mixins.server;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.world.level.chunk.ChunkGenerator;
#if PRE_MC_1_18_1
#if PRE_MC_1_18_2
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@@ -61,7 +61,7 @@ public class MixinUtilBackgroundThread
}
}
#endif
#if POST_MC_1_18_1
#if POST_MC_1_18_2
@Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;",
at = @At("HEAD"), cancellable = true)
private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier<?> r, CallbackInfoReturnable<Supplier<?>> ci)
@@ -19,7 +19,7 @@
package com.seibel.distanthorizons.forge.mixins.server.unsafe;
import org.spongepowered.asm.mixin.Mixin;
#if POST_MC_1_18_1
#if POST_MC_1_18_2
import net.minecraft.util.ThreadingDetector;
import org.spongepowered.asm.mixin.Mutable;
+1
View File
@@ -6,6 +6,7 @@ org.gradle.caching=true
# Mod Info
mod_name=DistantHorizons
mod_version=2.0.0-a-dev
api_version=1.0.0
maven_group=com.seibel.distanthorizons
mod_readable_name=Distant Horizons
mod_description=This mod generates and renders simplified terrain beyond the normal view distance at a low performance cost. Allowing you to see much farther without turning your game into a slideshow.
+1
View File
@@ -45,3 +45,4 @@ forge_version=36.2.39
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=2
enable_terrafirmacraft=0
+1
View File
@@ -45,3 +45,4 @@ forge_version=37.1.1
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=0
enable_terrafirmacraft=0
-50
View File
@@ -1,50 +0,0 @@
# @Depricated
# Support will be removed soon
# 1.18.1 version
#java_version = 17
#minecraft_version=1.18.1
#parchment_version=2022.03.06
#compatible_minecraft_versions=["1.18", "1.18.1"]
#accessWidenerVersion=1_18
#builds_for=fabric,forge
#
## Fabric loader
#fabric_loader_version=0.13.3
#fabric_api_version=0.46.6+1.18
# # Fabric mod versions
# modmenu_version=3.0.1
# starlight_version_fabric=3554912
# phosphor_version_fabric=3573395
# lithium_version=mc1.18.1-0.7.7
# sodium_version=mc1.18.1-0.4.0-alpha6
# iris_version=1.18.x-v1.2.5
# bclib_version=1.2.5
# immersive_portals_version=v1.0.4-1.18
#
# # Fabric mod run
# # 0 = Don't enable and don't run
# # 1 = Can be referenced in code but doesn't run
# # 2 = Can be referenced in code and runs in client
# enable_starlight=0
# enable_phosphor=0
# enable_sodium=1
# enable_lithium=0
# enable_iris=0
# enable_bclib=0
#
## Forge loader
#forge_version=39.1.2
# # Forge mod versions
# starlight_version_forge=3559934
# terraforged_version=
#
# # Forge mod run
# # 0 = Don't enable and don't run
# # 1 = Can be referenced in code but doesn't run
# # 2 = Can be referenced in code and runs in client
# enable_starlight_forge=0
# enable_terraforged=0
+1
View File
@@ -54,3 +54,4 @@ forge_version=40.2.9
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=0
enable_terrafirmacraft=0
+2 -1
View File
@@ -3,7 +3,7 @@ java_version = 17
minecraft_version=1.19.2
parchment_version=1.19.2:2022.11.27
compatible_minecraft_versions=["1.19.2"]
accessWidenerVersion=1_19
accessWidenerVersion=1_19_2
builds_for=fabric,forge
# Fabric loader
@@ -45,3 +45,4 @@ forge_version=43.2.14
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=0
enable_terrafirmacraft=0
+2 -1
View File
@@ -3,7 +3,7 @@ java_version = 17
minecraft_version=1.19.4
parchment_version=1.19.3:2023.03.12
compatible_minecraft_versions=["1.19.4"]
accessWidenerVersion=1_19
accessWidenerVersion=1_19_4
builds_for=fabric,forge
# Fabric loader
@@ -45,3 +45,4 @@ forge_version=45.1.0
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=0
enable_terrafirmacraft=0
-47
View File
@@ -1,47 +0,0 @@
# 1.19 version
java_version = 17
minecraft_version=1.19
parchment_version=1.19.2:2022.11.27
compatible_minecraft_versions=["1.19"]
accessWidenerVersion=1_19
builds_for=fabric,forge
# Fabric loader
fabric_loader_version=0.14.21
fabric_api_version=0.58.0+1.19
# Fabric mod versions
modmenu_version=4.0.4
starlight_version_fabric=
phosphor_version_fabric=
lithium_version=
sodium_version=mc1.19.2-0.4.4
iris_version=1.6.4+1.19.2
bclib_version=2.1.6
immersive_portals_version=
canvas_version=mc119-1.0.2453
# Fabric mod run
# 0 = Don't enable and don't run
# 1 = Can be referenced in code but doesn't run
# 2 = Can be referenced in code and runs in client
enable_starlight=0
enable_phosphor=0
enable_sodium=1
enable_lithium=0
enable_iris=0
enable_bclib=1
enable_immersive_portals=0
enable_canvas=0
# Forge loader
forge_version=41.1.0
# Forge mod versions
starlight_version_forge=
terraforged_version=
# Forge mod run
# 0 = Don't enable and don't run
# 1 = Can be referenced in code but doesn't run
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=0
+1
View File
@@ -45,3 +45,4 @@ forge_version=47.0.1
# 2 = Can be referenced in code and runs in client
enable_starlight_forge=0
enable_terraforged=0
enable_terrafirmacraft=0