First version where 1.18.1 & 1.18.2 is merged
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# 1.18.1 version based stuff
|
||||
|
||||
minecraft_version=1.18.1
|
||||
java_version = 17
|
||||
|
||||
# Fabric loader
|
||||
fabric_loader_version=0.13.2
|
||||
fabric_api_version=0.46.4+1.18
|
||||
# Fabric mod versions
|
||||
modmenu_version=3.0.1
|
||||
starlight_version_fabric=3554912
|
||||
lithium_version=mc1.18.1-0.7.7
|
||||
sodium_version=3605309
|
||||
iris_version=1.18.x-v1.1.4
|
||||
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_sodium=1
|
||||
enable_lithium=0
|
||||
enable_iris=0
|
||||
enable_bclib=0
|
||||
|
||||
# Forge loader
|
||||
forge_version=39.0.76
|
||||
# Forge mod versions
|
||||
starlight_version_forge=3559934
|
||||
|
||||
# Forge mod run
|
||||
# 0 = Dont 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
|
||||
@@ -0,0 +1,38 @@
|
||||
# 1.18.2 version based stuff
|
||||
# architectury_plugin_version = 3.4-SNAPSHOT
|
||||
# dev_architectury_loom_version = 0.10.0-SNAPSHOT
|
||||
minecraft_version=1.18.2
|
||||
java_version = 17
|
||||
|
||||
# Fabric loader
|
||||
fabric_loader_version=0.13.3
|
||||
fabric_api_version=0.47.8+1.18.2
|
||||
# Fabric mod versions
|
||||
modmenu_version=3.1.0
|
||||
starlight_version_fabric=3554912
|
||||
lithium_version=mc1.18.1-0.7.7
|
||||
sodium_version=3669187
|
||||
iris_version=1.18.x-v1.1.4
|
||||
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_sodium=1
|
||||
enable_lithium=0
|
||||
enable_iris=0
|
||||
enable_bclib=0
|
||||
|
||||
# Forge loader
|
||||
forge_version=40.0.1
|
||||
# Forge mod versions
|
||||
starlight_version_forge=3559934
|
||||
|
||||
# Forge mod run
|
||||
# 0 = Dont 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
|
||||
+29
-6
@@ -1,5 +1,6 @@
|
||||
import io.github.ran.jarmerger.JarMergerPlugin
|
||||
|
||||
|
||||
buildscript {
|
||||
dependencies{
|
||||
classpath files('plugins/DHJarMerger-1.0.jar')
|
||||
@@ -11,6 +12,25 @@ plugins {
|
||||
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false
|
||||
}
|
||||
|
||||
def loadProperties() {
|
||||
def defaultMcVersion = '1.18.2'
|
||||
if (!project.hasProperty("mcVer")) {
|
||||
println "No mcVer set! Defaulting to ${defaultMcVersion}."
|
||||
println "Tip: Use -PmcVer='${defaultMcVersion}' in cmd arg to set mcVer."
|
||||
}
|
||||
def mcVersion = project.hasProperty("mcVer") ? mcVer : defaultMcVersion
|
||||
|
||||
println "Loading properties file at " + mcVersion + ".properties"
|
||||
def props = new Properties()
|
||||
props.load(new FileInputStream("$rootProject.rootDir/"+"$mcVersion"+".properties"))
|
||||
|
||||
props.each { prop ->
|
||||
rootProject.ext.set(prop.key, prop.value)
|
||||
// println "Added prop [key:" + prop.key + ", value:" + prop.value + "]"
|
||||
}
|
||||
}
|
||||
loadProperties()
|
||||
|
||||
apply plugin: JarMergerPlugin
|
||||
|
||||
architectury {
|
||||
@@ -36,7 +56,7 @@ subprojects { p ->
|
||||
mappings loom.officialMojangMappings()
|
||||
|
||||
//Manifold
|
||||
annotationProcessor 'systems.manifold:manifold-preprocessor:2022.1.5'
|
||||
annotationProcessor "systems.manifold:manifold-preprocessor:${rootProject.manifold_version}"
|
||||
|
||||
// Toml
|
||||
implementation("com.electronwill.night-config:toml:${rootProject.toml_version}")
|
||||
@@ -47,7 +67,6 @@ subprojects { p ->
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
}
|
||||
|
||||
|
||||
if (p != project(":core")) {
|
||||
common(project(":core")) { transitive false }
|
||||
shadowMe(project(":core")) { transitive false }
|
||||
@@ -124,8 +143,11 @@ allprojects { p ->
|
||||
description: mod_description,
|
||||
homepage: mod_homepage,
|
||||
source: mod_source,
|
||||
issues: mod_issues
|
||||
issues: mod_issues,
|
||||
minecraft_version: minecraft_version,
|
||||
java_version: java_version
|
||||
] // The left side is what gets replaced in the mod info and the right side is where to get it from in the gradle.properties
|
||||
//TODO: Make Forge loader version also be relaced with non hardcoded value instead of "[36,41)"
|
||||
|
||||
inputs.properties replaceProperties
|
||||
replaceProperties.put 'project', project
|
||||
@@ -150,11 +172,12 @@ allprojects { p ->
|
||||
tasks.withType(JavaCompile) {
|
||||
|
||||
// Add Manifold Preprocessor
|
||||
options.compilerArgs += ['-Xplugin:Manifold']
|
||||
def excapedMCVersion = rootProject.minecraft_version.replace(".", "_")
|
||||
options.compilerArgs += ['-Xplugin:Manifold', "-AMC_VERSION_${excapedMCVersion}"]
|
||||
|
||||
// println options.compilerArgs
|
||||
if (p != project(":core")) {
|
||||
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
|
||||
options.release = 17
|
||||
options.release = rootProject.java_version as Integer
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I
|
||||
|
||||
#define CONFIG
|
||||
|
||||
#if MC_VERSION_1.18.2
|
||||
|
||||
stafdqvsrevasbhyuicwegyhio
|
||||
|
||||
#endif
|
||||
/**
|
||||
* This handles any configuration the user has access to.
|
||||
* @author coolGi2007
|
||||
|
||||
@@ -66,8 +66,13 @@ public class ChunkWrapper implements IChunkWrapper
|
||||
@Override
|
||||
public IBiomeWrapper getBiome(int x, int y, int z)
|
||||
{
|
||||
#if MC_VERSION_1_18_2
|
||||
return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome(
|
||||
QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)).value());
|
||||
#elif MC_VERSION_1_18_1
|
||||
return BiomeWrapper.getBiomeWrapper(chunk.getNoiseBiome(
|
||||
QuartPos.fromBlock(x), QuartPos.fromBlock(y), QuartPos.fromBlock(z)));
|
||||
#endif
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
@@ -167,12 +167,17 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
pos = getMaximumRenderedChunks();
|
||||
return pos;
|
||||
}
|
||||
#define MC_VERSION_1_18_1
|
||||
if (!usingBackupGetVanillaRenderedChunks) {
|
||||
try {
|
||||
LevelRenderer levelRenderer = MC.levelRenderer;
|
||||
LinkedHashSet<LevelRenderer.RenderChunkInfo> chunks = levelRenderer.renderChunkStorage.get().renderChunks;
|
||||
return (chunks.stream().map((chunk) -> {
|
||||
#if MC_VERSION_1_18_2
|
||||
AABB chunkBoundingBox = chunk.chunk.getBoundingBox();
|
||||
#elif MC_VERSION_1_18_1
|
||||
AABB chunkBoundingBox = chunk.chunk.bb;
|
||||
#endif
|
||||
return FACTORY.createChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16),
|
||||
Math.floorDiv((int) chunkBoundingBox.minZ, 16));
|
||||
}).collect(Collectors.toCollection(HashSet::new)));
|
||||
|
||||
+85
-21
@@ -5,16 +5,23 @@ import com.google.common.collect.Maps;
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import com.seibel.lod.core.api.ApiShared;
|
||||
import com.seibel.lod.core.api.ClientApi;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
#if MC_VERSION_1_18_2
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
|
||||
#endif
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
@@ -38,7 +45,6 @@ import net.minecraft.world.level.chunk.PalettedContainer;
|
||||
import net.minecraft.world.level.chunk.UpgradeData;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
import net.minecraft.world.level.levelgen.blending.BlendingData;
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
|
||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
||||
import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||
import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext;
|
||||
@@ -70,11 +76,14 @@ public class ChunkLoader
|
||||
private static LevelChunkSection[] readSections(LevelAccessor level, LevelLightEngine lightEngine, ChunkPos chunkPos, CompoundTag chunkData)
|
||||
{
|
||||
Registry<Biome> biomes = level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
|
||||
// Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(
|
||||
// biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS));
|
||||
#if MC_VERSION_1_18_1
|
||||
Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(
|
||||
biomes, biomes.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getOrThrow(Biomes.PLAINS));
|
||||
#elif MC_VERSION_1_18_2
|
||||
Codec<PalettedContainer<Holder<Biome>>> biomeCodec = PalettedContainer.codec(
|
||||
biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS));
|
||||
|
||||
#endif
|
||||
|
||||
int i = level.getSectionsCount();
|
||||
LevelChunkSection[] chunkSections = new LevelChunkSection[i];
|
||||
|
||||
@@ -90,18 +99,26 @@ public class ChunkLoader
|
||||
if (sectionId >= 0 && sectionId < chunkSections.length)
|
||||
{
|
||||
PalettedContainer<BlockState> blockStateContainer;
|
||||
#if MC_VERSION_1_18_1
|
||||
PalettedContainer<Biome> biomeContainer;
|
||||
#elif MC_VERSION_1_18_2
|
||||
PalettedContainer<Holder<Biome>> biomeContainer;
|
||||
#endif
|
||||
|
||||
blockStateContainer = tagSection.contains("block_states", 10)
|
||||
? BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, tagSection.getCompound("block_states")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error)
|
||||
: new PalettedContainer<BlockState>(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES);
|
||||
|
||||
#if MC_VERSION_1_18_1
|
||||
biomeContainer = tagSection.contains("biomes", 10)
|
||||
? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, i, (String) string)).getOrThrow(false, LOGGER::error)
|
||||
: new PalettedContainer<Holder<Biome>>(biomes.asHolderIdMap(), biomes.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
||||
// biomeContainer = tagSection.contains("biomes", 10)
|
||||
// ? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error)
|
||||
// : new PalettedContainer<Holder<Biome>>(biomes, biomes.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
||||
? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, sectionYPos, string)).getOrThrow(false, LOGGER::error)
|
||||
: new PalettedContainer<Biome>(biomes, biomes.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
||||
#elif MC_VERSION_1_18_2
|
||||
biomeContainer = tagSection.contains("biomes", 10)
|
||||
? biomeCodec.parse(NbtOps.INSTANCE, tagSection.getCompound("biomes")).promotePartial(string -> logErrors(chunkPos, i, (String) string)).getOrThrow(false, LOGGER::error)
|
||||
: new PalettedContainer<Holder<Biome>>(biomes.asHolderIdMap(), biomes.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
||||
#endif
|
||||
|
||||
|
||||
chunkSections[sectionId] = new LevelChunkSection(sectionYPos, blockStateContainer, biomeContainer);
|
||||
}
|
||||
@@ -128,20 +145,66 @@ public class ChunkLoader
|
||||
}
|
||||
Heightmap.primeHeightmaps(chunk, ChunkStatus.FULL.heightmapsAfter());
|
||||
}
|
||||
|
||||
private static Map<ConfiguredStructureFeature<?, ?>, StructureStart> unpackStructureStart(StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l)
|
||||
|
||||
#if MC_VERSION_1_18_1
|
||||
private static Map<StructureFeature<?>, StructureStart<?>> unpackStructureStart(StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l)
|
||||
{
|
||||
Map<ConfiguredStructureFeature<?, ?>, StructureStart> map = Maps.newHashMap();
|
||||
Registry<ConfiguredStructureFeature<?, ?>> structStartRegistry = structurePieceSerializationContext.registryAccess().registryOrThrow(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY);
|
||||
CompoundTag compoundTag2 = compoundTag.getCompound("starts");
|
||||
HashMap<StructureFeature<?>, StructureStart<?>> map = Maps.newHashMap();
|
||||
CompoundTag compoundTag2 = compoundTag.getCompound("starts");
|
||||
for (String string : compoundTag2.getAllKeys())
|
||||
{
|
||||
ResourceLocation resourceLocation = ResourceLocation.tryParse(string);
|
||||
String string2 = string.toLowerCase(Locale.ROOT);
|
||||
StructureFeature<?> structureFeature = StructureFeature.STRUCTURES_REGISTRY.get(string2);
|
||||
if (structureFeature == null)
|
||||
{
|
||||
LOGGER.error("Unknown structure start: {}", (Object) string2);
|
||||
continue;
|
||||
}
|
||||
StructureStart<?> structureStart = StructureFeature.loadStaticStart(structurePieceSerializationContext, compoundTag2.getCompound(string), l);
|
||||
if (structureStart == null)
|
||||
continue;
|
||||
map.put(structureFeature, structureStart);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
private static Map<StructureFeature<?>, LongSet> unpackStructureReferences(ChunkPos chunkPos, CompoundTag compoundTag)
|
||||
{
|
||||
HashMap<StructureFeature<?>, LongSet> map = Maps.newHashMap();
|
||||
CompoundTag compoundTag2 = compoundTag.getCompound("References");
|
||||
for (String string : compoundTag2.getAllKeys())
|
||||
{
|
||||
String string2 = string.toLowerCase(Locale.ROOT);
|
||||
StructureFeature<?> structureFeature = StructureFeature.STRUCTURES_REGISTRY.get(string2);
|
||||
if (structureFeature == null)
|
||||
{
|
||||
LOGGER.warn("Found reference to unknown structure '{}' in chunk {}, discarding", (Object) string2, (Object) chunkPos);
|
||||
continue;
|
||||
}
|
||||
map.put(structureFeature, new LongOpenHashSet(Arrays.stream(compoundTag2.getLongArray(string)).filter(l ->
|
||||
{
|
||||
ChunkPos chunkPos2 = new ChunkPos(l);
|
||||
if (chunkPos2.getChessboardDistance(chunkPos) > 8)
|
||||
{
|
||||
LOGGER.warn("Found invalid structure reference [ {} @ {} ] for chunk {}.", (Object) string2, (Object) chunkPos2, (Object) chunkPos);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}).toArray()));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
#elif MC_VERSION_1_18_2
|
||||
private static Map<ConfiguredStructureFeature<?, ?>, StructureStart> unpackStructureStart(StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l) {
|
||||
Map<ConfiguredStructureFeature<?, ?>, StructureStart> map = Maps.newHashMap();
|
||||
Registry<ConfiguredStructureFeature<?, ?>> structStartRegistry = structurePieceSerializationContext.registryAccess().registryOrThrow(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY);
|
||||
CompoundTag compoundTag2 = compoundTag.getCompound("starts");
|
||||
for (String string : compoundTag2.getAllKeys()) {
|
||||
ResourceLocation resourceLocation = ResourceLocation.tryParse(string);
|
||||
ConfiguredStructureFeature<?, ?> structureFeature = structStartRegistry.get(resourceLocation);
|
||||
// String string2 = string.toLowerCase(Locale.ROOT);
|
||||
// ConfiguredStructureFeature<?, ?> structureFeature = StructureFeature.STRUCTURES_REGISTRY.get(string2);
|
||||
if (structureFeature == null)
|
||||
{
|
||||
if (structureFeature == null) {
|
||||
LOGGER.error("Unknown structure start: {}", resourceLocation);
|
||||
continue;
|
||||
}
|
||||
@@ -152,7 +215,7 @@ public class ChunkLoader
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
private static Map<ConfiguredStructureFeature<?, ?>, LongSet> unpackStructureReferences(RegistryAccess registryAccess, ChunkPos chunkPos, CompoundTag compoundTag)
|
||||
{
|
||||
Map<ConfiguredStructureFeature<?, ?>, LongSet> map = Maps.newHashMap();
|
||||
@@ -182,13 +245,14 @@ public class ChunkLoader
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
private static void readStructures(WorldGenLevel level, LevelChunk chunk, CompoundTag chunkData)
|
||||
{
|
||||
CompoundTag tagStructures = chunkData.getCompound("structures");
|
||||
chunk.setAllStarts(
|
||||
unpackStructureStart(StructurePieceSerializationContext.fromLevel(level.getLevel()), tagStructures, level.getSeed()));
|
||||
chunk.setAllReferences(unpackStructureReferences(level.registryAccess() ,chunk.getPos(), tagStructures));
|
||||
chunk.setAllReferences(unpackStructureReferences(#if MC_VERSION_1_18_2 level.registryAccess() ,#endif chunk.getPos(), tagStructures));
|
||||
}
|
||||
|
||||
private static void readPostPocessings(LevelChunk chunk, CompoundTag chunkData)
|
||||
|
||||
+10
-2
@@ -247,12 +247,20 @@ public class LightedWorldGenRegion extends WorldGenRegion {
|
||||
BlockTintCache blockTintCache = (BlockTintCache) this.tintCaches.get(colorResolver);
|
||||
return blockTintCache.getColor(blockPos);
|
||||
}
|
||||
|
||||
private Biome _getBiome(BlockPos pos) {
|
||||
#if MC_VERSION_1_18_2
|
||||
return getBiome(pos).value();
|
||||
#elif MC_VERSION_1_18_1
|
||||
return getBiome(pos);
|
||||
#endif
|
||||
}
|
||||
|
||||
public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver)
|
||||
{
|
||||
int i = (Minecraft.getInstance()).options.biomeBlendRadius;
|
||||
if (i == 0)
|
||||
return colorResolver.getColor((Biome) getBiome(blockPos).value(), blockPos.getX(), blockPos.getZ());
|
||||
return colorResolver.getColor((Biome) _getBiome(blockPos), blockPos.getX(), blockPos.getZ());
|
||||
int j = (i * 2 + 1) * (i * 2 + 1);
|
||||
int k = 0;
|
||||
int l = 0;
|
||||
@@ -262,7 +270,7 @@ public class LightedWorldGenRegion extends WorldGenRegion {
|
||||
while (cursor3D.advance())
|
||||
{
|
||||
mutableBlockPos.set(cursor3D.nextX(), cursor3D.nextY(), cursor3D.nextZ());
|
||||
int n = colorResolver.getColor((Biome) getBiome((BlockPos) mutableBlockPos).value(), mutableBlockPos.getX(), mutableBlockPos.getZ());
|
||||
int n = colorResolver.getColor((Biome) _getBiome((BlockPos) mutableBlockPos), mutableBlockPos.getX(), mutableBlockPos.getZ());
|
||||
k += (n & 0xFF0000) >> 16;
|
||||
l += (n & 0xFF00) >> 8;
|
||||
m += n & 0xFF;
|
||||
|
||||
@@ -23,7 +23,7 @@ accessible field net/minecraft/world/level/lighting/LevelLightEngine skyEngine L
|
||||
accessible method net/minecraft/world/level/levelgen/Heightmap setHeight (III)V
|
||||
accessible field net/minecraft/world/level/biome/Biome generationSettings Lnet/minecraft/world/level/biome/BiomeGenerationSettings;
|
||||
accessible field net/minecraft/world/level/biome/Biome biomeCategory Lnet/minecraft/world/level/biome/Biome$BiomeCategory;
|
||||
accessible field net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator settings Lnet/minecraft/core/Holder;
|
||||
# accessible field net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator settings Lnet/minecraft/core/Holder;
|
||||
accessible method net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator doFill (Lnet/minecraft/world/level/levelgen/blending/Blender;Lnet/minecraft/world/level/StructureFeatureManager;Lnet/minecraft/world/level/chunk/ChunkAccess;II)Lnet/minecraft/world/level/chunk/ChunkAccess;
|
||||
#accessible method net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator doCreateBiomes (Lnet/minecraft/core/Registry;Lnet/minecraft/world/level/levelgen/blending/Blender;Lnet/minecraft/world/level/StructureFeatureManager;Lnet/minecraft/world/level/chunk/ChunkAccess;)V
|
||||
accessible method net/minecraft/world/level/lighting/LayerLightEngine queueSectionData (JLnet/minecraft/world/level/chunk/DataLayer;Z)V
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.seibel.lod.fabric.Main;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.multiplayer.ClientPacketListener;
|
||||
import net.minecraft.client.renderer.LevelRenderer;
|
||||
#if MC_VERSION_1_18_2
|
||||
import net.minecraft.core.Holder;
|
||||
#endif
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.chunk.LevelChunk;
|
||||
import net.minecraft.world.level.dimension.DimensionType;
|
||||
@@ -19,12 +21,21 @@ import java.util.function.Supplier;
|
||||
* This class is used for world loading events
|
||||
* @author Ran
|
||||
*/
|
||||
|
||||
@Mixin(ClientLevel.class)
|
||||
public class MixinClientLevel {
|
||||
#if MC_VERSION_1_18_2
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, Holder holder, int i, int j, Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) {
|
||||
Main.client_proxy.worldLoadEvent((ClientLevel) (Object) this);
|
||||
}
|
||||
#elif MC_VERSION_1_18_1
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
private void loadWorldEvent(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, DimensionType dimensionType, int i, int j, Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) {
|
||||
Main.client_proxy.worldLoadEvent((ClientLevel) (Object) this);
|
||||
}
|
||||
#endif
|
||||
|
||||
@Inject(method = "setLightReady", at = @At("HEAD"))
|
||||
private void onChunkLightReady(int x, int z, CallbackInfo ci) {
|
||||
ClientLevel l = (ClientLevel) (Object) this;
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
"depends": {
|
||||
"fabricloader": "*",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.18.2",
|
||||
"java": ">=17"
|
||||
"minecraft": "${minecraft_version}",
|
||||
"java": ">=${java_version}"
|
||||
},
|
||||
"suggests": {
|
||||
"another-mod": "*"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
modLoader="javafml" #//mandatory
|
||||
loaderVersion="[37,41)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
loaderVersion="[36,41)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
license="GNU GPLv3"
|
||||
issueTrackerURL="${issues}"
|
||||
|
||||
|
||||
+7
-36
@@ -1,13 +1,10 @@
|
||||
org.gradle.jvmargs=-Xmx2048M
|
||||
|
||||
minecraft_version=1.18.2
|
||||
|
||||
archives_base_name=DistantHorizons
|
||||
mod_version=1.6.2a
|
||||
maven_group=com.seibel.lod
|
||||
toml_version=3.6.4
|
||||
archives_base_name=DistantHorizons
|
||||
|
||||
# Mod info
|
||||
mod_version=1.6.2a
|
||||
mod_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.
|
||||
mod_authors=James Seibel, Leonardo Amato, Cola, coolGi2007, Ran, Leetom
|
||||
@@ -15,35 +12,9 @@ mod_homepage=https://www.curseforge.com/minecraft/mc-mods/distant-horizons
|
||||
mod_source=https://gitlab.com/jeseibel/minecraft-lod-mod/
|
||||
mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues
|
||||
|
||||
# Fabric loader
|
||||
fabric_loader_version=0.13.3
|
||||
fabric_api_version=0.47.8+1.18.2
|
||||
# Fabric mod versions
|
||||
modmenu_version=3.1.0
|
||||
starlight_version_fabric=3554912
|
||||
lithium_version=mc1.18.1-0.7.7
|
||||
sodium_version=3669187
|
||||
iris_version=1.18.x-v1.1.4
|
||||
bclib_version=1.2.5
|
||||
immersive_portals_version = v1.0.4-1.18
|
||||
# Global Plugin versions
|
||||
toml_version=3.6.4
|
||||
manifold_version=2022.1.5
|
||||
|
||||
# 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_sodium=1
|
||||
enable_lithium=0
|
||||
enable_iris=0
|
||||
enable_bclib=0
|
||||
|
||||
# Forge loader
|
||||
forge_version=40.0.1
|
||||
# Forge mod versions
|
||||
starlight_version_forge=3559934
|
||||
|
||||
# Forge mod run
|
||||
# 0 = Dont 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
|
||||
##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS:
|
||||
mcVer=1.18.1
|
||||
Reference in New Issue
Block a user