The quickest update to dh. (1.19.1 support)
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
# 1.18.2 version based stuff
|
||||
|
||||
java_version = 17
|
||||
minecraft_version=1.19
|
||||
minecraft_version=1.19.1
|
||||
parchment_version=2022.03.13
|
||||
compatible_minecraft_versions=["1.19"]
|
||||
compatible_minecraft_versions=["1.19", "1.19.1"]
|
||||
|
||||
# Fabric loader
|
||||
fabric_loader_version=0.14.8
|
||||
fabric_api_version=0.57.0+1.19
|
||||
fabric_api_version=0.58.5+1.19.1
|
||||
# Fabric mod versions
|
||||
modmenu_version=4.0.0
|
||||
starlight_version_fabric=0
|
||||
phosphor_version_fabric=0
|
||||
lithium_version=0
|
||||
sodium_version=3820973
|
||||
iris_version=1.19.x-v1.2.5
|
||||
iris_version=1.19.x-v1.2.6
|
||||
immersive_portals_version = 0
|
||||
bclib_version=0
|
||||
|
||||
@@ -30,7 +30,7 @@ fabric_api_version=0.57.0+1.19
|
||||
enable_bclib=0
|
||||
|
||||
# Forge loader
|
||||
forge_version=41.0.94
|
||||
forge_version=42.0.0
|
||||
# Forge mod versions
|
||||
starlight_version_forge=0
|
||||
terraforged_version=
|
||||
+4
-4
@@ -53,7 +53,7 @@ def writeBuildGradlePredefine(List<String> mcVers, int mcIndex) {
|
||||
|
||||
// Sets up the variables for Manifold in the code
|
||||
def loadProperties() {
|
||||
def defaultMcVersion = "1.19"
|
||||
def defaultMcVersion = "1.19.1"
|
||||
def mcVersion = ""
|
||||
def mcVers = mcVersions.split(",")
|
||||
int mcIndex = -1
|
||||
@@ -86,7 +86,7 @@ def loadProperties() {
|
||||
"1.17.1": "1_17",
|
||||
"1.18.1": "1_18",
|
||||
"1.18.2": "1_18",
|
||||
"1.19" : "1_19"
|
||||
"1.19.1" : "1_19"
|
||||
]
|
||||
// Use this as sometimes multiple versions use the same access wideners
|
||||
rootProject.ext.set("acsessWidenerVersion", mcVersionToAcsessWidenerVersion.get(mcVersion))
|
||||
@@ -239,10 +239,10 @@ subprojects { p ->
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
if (rootProject.minecraft_version != "1.19")
|
||||
if (rootProject.minecraft_version != "1.19.1")
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
else
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19.x or higher doesnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
}
|
||||
|
||||
//Manifold
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ dependencies {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
if (rootProject.minecraft_version != "1.19")
|
||||
if (rootProject.minecraft_version != "1.19.1")
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
else
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
|
||||
@@ -22,7 +22,7 @@ package com.seibel.lod.common.forge;
|
||||
import com.seibel.lod.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_1
|
||||
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_1
|
||||
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
|
||||
|
||||
@@ -68,7 +68,7 @@ import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
#if POST_MC_1_19
|
||||
#if POST_MC_1_19_1
|
||||
import net.minecraft.util.RandomSource;
|
||||
#endif
|
||||
|
||||
@@ -80,7 +80,7 @@ public class BlockDetailWrapper extends IBlockDetailWrapper
|
||||
|
||||
public static final int FLOWER_COLOR_SCALE = 5;
|
||||
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
public static final Random random = new Random(0);
|
||||
#else
|
||||
public static final RandomSource random = RandomSource.create();
|
||||
|
||||
@@ -47,7 +47,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
#endif
|
||||
@@ -111,7 +111,7 @@ public abstract class ConfigGui
|
||||
Object value;
|
||||
String tempValue;
|
||||
boolean inLimits = true;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
TranslatableComponent name;
|
||||
#else
|
||||
Component name;
|
||||
@@ -212,7 +212,7 @@ public abstract class ConfigGui
|
||||
if (entry != null)
|
||||
{
|
||||
if (!entry.name().equals(""))
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
info.name = new TranslatableComponent(entry.name());
|
||||
#else
|
||||
info.name = Component.translatable(entry.name());
|
||||
@@ -237,7 +237,7 @@ public abstract class ConfigGui
|
||||
else if (fieldClass == boolean.class)
|
||||
{
|
||||
// For boolean
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
Function<Object, Component> func = value -> new TextComponent((Boolean) value ? "True" : "False").withStyle((Boolean) value ? ChatFormatting.GREEN : ChatFormatting.RED);
|
||||
#else
|
||||
Function<Object, Component> func = value -> Component.translatable((Boolean) value ? "True" : "False").withStyle((Boolean) value ? ChatFormatting.GREEN : ChatFormatting.RED);
|
||||
@@ -251,7 +251,7 @@ public abstract class ConfigGui
|
||||
{
|
||||
// For enum
|
||||
List<?> values = Arrays.asList(field.getType().getEnumConstants());
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
Function<Object, Component> func = value -> new TranslatableComponent(MOD_NAME + ".config." + "enum." + fieldClass.getSimpleName() + "." + info.value.toString());
|
||||
#else
|
||||
Function<Object, Component> func = value -> Component.translatable(MOD_NAME + ".config." + "enum." + fieldClass.getSimpleName() + "." + info.value.toString());
|
||||
@@ -266,7 +266,7 @@ public abstract class ConfigGui
|
||||
else if (screenEntry != null)
|
||||
{
|
||||
if (!screenEntry.name().equals(""))
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
info.name = new TranslatableComponent(screenEntry.name());
|
||||
#else
|
||||
info.name = Component.translatable(screenEntry.name());
|
||||
@@ -299,7 +299,7 @@ public abstract class ConfigGui
|
||||
{
|
||||
value = func.apply(stringValue);
|
||||
inLimits = value.doubleValue() >= minValue && value.doubleValue() <= maxValue;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
info.error = inLimits ? null : new AbstractMap.SimpleEntry<>(editBox, new TextComponent(value.doubleValue() < minValue ?
|
||||
#else
|
||||
info.error = inLimits ? null : new AbstractMap.SimpleEntry<>(editBox, Component.translatable(value.doubleValue() < minValue ?
|
||||
@@ -515,7 +515,7 @@ public abstract class ConfigGui
|
||||
{
|
||||
protected ConfigScreen(Screen parent, String category)
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
super(new TranslatableComponent(
|
||||
#else
|
||||
super(Component.translatable(
|
||||
@@ -586,7 +586,7 @@ public abstract class ConfigGui
|
||||
{
|
||||
if (info.category.matches(category) && !info.hideOption)
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
TranslatableComponent name = (info.name == null ? new TranslatableComponent(translationPrefix + (!info.category.isEmpty() ? info.category + "." : "") + info.field.getName()) : info.name);
|
||||
Button resetButton = new Button(this.width - ConfigScreenConfigs.SpaceFromRightScreen - info.width - ConfigScreenConfigs.ButtonWidthSpacing - ConfigScreenConfigs.ResetButtonWidth, 0, ConfigScreenConfigs.ResetButtonWidth, 20, new TextComponent("Reset").withStyle(ChatFormatting.RED), (button -> {
|
||||
#else
|
||||
@@ -604,7 +604,7 @@ public abstract class ConfigGui
|
||||
{
|
||||
Map.Entry<Button.OnPress, Function<Object, Component>> widget = (Map.Entry<Button.OnPress, Function<Object, Component>>) info.widget;
|
||||
if (info.field.getType().isEnum())
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
widget.setValue(value -> new TranslatableComponent(translationPrefix + "enum." + info.field.getType().getSimpleName() + "." + info.value.toString()));
|
||||
#else
|
||||
widget.setValue(value -> Component.translatable(translationPrefix + "enum." + info.field.getType().getSimpleName() + "." + info.value.toString()));
|
||||
@@ -624,7 +624,7 @@ public abstract class ConfigGui
|
||||
Predicate<String> processor = ((BiFunction<EditBox, Button, Predicate<String>>) info.widget).apply(widget, done);
|
||||
widget.setFilter(processor);
|
||||
resetButton.setWidth(20);
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
resetButton.setMessage(new TextComponent("R").withStyle(ChatFormatting.RED));
|
||||
Button cycleButton = new Button(this.width - 185, 0, 20, 20, new TextComponent(String.valueOf(info.index)).withStyle(ChatFormatting.GOLD), (button -> {
|
||||
#else
|
||||
@@ -679,7 +679,7 @@ public abstract class ConfigGui
|
||||
if (list.getHoveredButton(mouseX,mouseY).isPresent()) {
|
||||
AbstractWidget buttonWidget = list.getHoveredButton(mouseX,mouseY).get();
|
||||
Component text = ButtonEntry.buttonsWithText.get(buttonWidget);
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
TranslatableComponent name = new TranslatableComponent(this.translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName());
|
||||
#else
|
||||
Component name = Component.translatable(this.translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName());
|
||||
@@ -690,7 +690,7 @@ public abstract class ConfigGui
|
||||
else if (I18n.exists(key) && (text != null && text.equals(name))) {
|
||||
List<Component> list = new ArrayList<>();
|
||||
for (String str : I18n.get(key).split("\n"))
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
list.add(new TextComponent(str));
|
||||
#else
|
||||
list.add(Component.translatable(str));
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.client.server.IntegratedServer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
#endif
|
||||
import net.minecraft.network.chat.Component;
|
||||
@@ -368,7 +368,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper
|
||||
@Override
|
||||
public void sendChatMessage(String string)
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
getPlayer().sendMessage(new TextComponent(string), getPlayer().getUUID());
|
||||
#else
|
||||
getPlayer().sendSystemMessage(Component.translatable(string));
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
@Override
|
||||
public double getGamma()
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
return MC.options.gamma;
|
||||
#else
|
||||
return MC.options.gamma().get();
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.seibel.lod.core.util.LodUtil;
|
||||
import com.seibel.lod.core.wrapperInterfaces.world.IBiomeWrapper;
|
||||
|
||||
import net.minecraft.data.BuiltinRegistries;
|
||||
#if POST_MC_1_19
|
||||
#if POST_MC_1_19_1
|
||||
import net.minecraft.data.worldgen.biome.EndBiomes;
|
||||
import net.minecraft.data.worldgen.biome.NetherBiomes;
|
||||
#endif
|
||||
@@ -71,7 +71,7 @@ public class BiomeWrapper implements IBiomeWrapper
|
||||
}
|
||||
|
||||
/** Returns a color int for the given biome. */
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
@Override
|
||||
public int getColorForBiome(int x, int z)
|
||||
{
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
|
||||
CompoundTag chunkData = null;
|
||||
try
|
||||
{
|
||||
#if POST_MC_1_19
|
||||
#if POST_MC_1_19_1
|
||||
chunkData = level.getChunkSource().chunkMap.readChunk(chunkPos).get().orElse(null);
|
||||
#else
|
||||
chunkData = level.getChunkSource().chunkMap.readChunk(chunkPos);
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
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_1
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager;
|
||||
#else
|
||||
import net.minecraft.world.level.levelgen.RandomState;
|
||||
@@ -46,7 +46,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_1
|
||||
public final StructureManager structures;
|
||||
#else
|
||||
public final StructureTemplateManager structures;
|
||||
@@ -85,7 +85,7 @@ public final class GlobalParameters
|
||||
structures = server.getStructureManager();
|
||||
generator = level.getChunkSource().getGenerator();
|
||||
fixerUpper = server.getFixerUpper();
|
||||
#if POST_MC_1_19
|
||||
#if POST_MC_1_19_1
|
||||
randomState = level.getChunkSource().randomState();
|
||||
#endif
|
||||
}
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public final class ThreadedParameters
|
||||
level = param.level;
|
||||
#if PRE_MC_1_18_1
|
||||
structFeat = new WorldGenStructFeatManager(param.worldGenSettings, level);
|
||||
#elif PRE_MC_1_19
|
||||
#elif PRE_MC_1_19_1
|
||||
structCheck = new StructureCheck(param.chunkScanner, param.registry, param.structures,
|
||||
param.level.dimension(), param.generator, level, param.generator.getBiomeSource(), param.worldSeed,
|
||||
param.fixerUpper);
|
||||
|
||||
+5
-5
@@ -52,7 +52,7 @@ import net.minecraft.world.level.chunk.storage.ChunkSerializer;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
#if POST_MC_1_18_1
|
||||
import net.minecraft.world.level.levelgen.blending.BlendingData;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
||||
#endif
|
||||
import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||
@@ -62,7 +62,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_1
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
|
||||
#endif
|
||||
#endif
|
||||
@@ -74,7 +74,7 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class ChunkLoader
|
||||
{
|
||||
#if POST_MC_1_19
|
||||
#if POST_MC_1_19_1
|
||||
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
|
||||
private static final Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState());
|
||||
@@ -107,7 +107,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_1
|
||||
Codec<PalettedContainer<Holder<Biome>>> biomeCodec = PalettedContainer.codec(
|
||||
biomes.asHolderIdMap(), biomes.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomes.getHolderOrThrow(Biomes.PLAINS));
|
||||
#else
|
||||
@@ -231,7 +231,7 @@ public class ChunkLoader
|
||||
return null;
|
||||
#else
|
||||
BlendingData blendingData = readBlendingData(tagLevel);
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
if (chunkType == ChunkStatus.ChunkType.PROTOCHUNK && (blendingData == null || !blendingData.oldNoise()))
|
||||
return null;
|
||||
#else
|
||||
|
||||
+2
-2
@@ -46,7 +46,7 @@ import net.minecraft.world.level.ColorResolver;
|
||||
import net.minecraft.world.level.LevelHeightAccessor;
|
||||
#endif
|
||||
import net.minecraft.world.level.LightLayer;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
||||
#endif
|
||||
@@ -292,7 +292,7 @@ public class LightedWorldGenRegion extends WorldGenRegion {
|
||||
|
||||
public int calculateBlockTint(BlockPos blockPos, ColorResolver colorResolver)
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
int i = (Minecraft.getInstance()).options.biomeBlendRadius;
|
||||
#else
|
||||
int i = (Minecraft.getInstance()).options.biomeBlendRadius().get();
|
||||
|
||||
+3
-3
@@ -41,7 +41,7 @@ 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_1
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
|
||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
@@ -55,7 +55,7 @@ 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_1
|
||||
public class WorldGenStructFeatManager extends StructureFeatureManager {
|
||||
#else
|
||||
public class WorldGenStructFeatManager extends StructureManager {
|
||||
@@ -132,7 +132,7 @@ public class WorldGenStructFeatManager extends StructureManager {
|
||||
return builder.build();
|
||||
}
|
||||
#else
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
@Override
|
||||
public List<StructureStart> startsForFeature(SectionPos sectionPos, Predicate<ConfiguredStructureFeature<?, ?>> predicate) {
|
||||
ChunkAccess chunk = _getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES);
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import com.seibel.lod.common.wrappers.worldGeneration.ThreadedParameters;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.server.level.WorldGenRegion;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
#endif
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
@@ -73,7 +73,7 @@ public final class StepBiomes {
|
||||
// System.out.println("StepBiomes: "+chunk.getPos());
|
||||
#if PRE_MC_1_18_1
|
||||
environment.params.generator.createBiomes(environment.params.biomes, chunk);
|
||||
#elif PRE_MC_1_19
|
||||
#elif PRE_MC_1_19_1
|
||||
chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, Blender.of(worldGenRegion),
|
||||
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
|
||||
#else
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ import net.minecraft.util.Mth;
|
||||
#if POST_MC_1_17_1
|
||||
import net.minecraft.world.level.LevelHeightAccessor;
|
||||
#endif
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
#endif
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
@@ -81,7 +81,7 @@ public final class StepNoise {
|
||||
#elif PRE_MC_1_18_1
|
||||
chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run,
|
||||
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
|
||||
#elif PRE_MC_1_19
|
||||
#elif PRE_MC_1_19_1
|
||||
chunk = environment.joinSync(environment.params.generator.fillFromNoise(Runnable::run, Blender.of(worldGenRegion),
|
||||
tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk));
|
||||
#else
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.server.level.WorldGenRegion;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
#endif
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
|
||||
+4
-4
@@ -67,17 +67,17 @@ public final class StepStructureStart {
|
||||
chunksToDo.add(chunk);
|
||||
}
|
||||
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
if (environment.params.worldGenSettings.generateFeatures()) {
|
||||
#elif POST_MC_1_19
|
||||
#elif POST_MC_1_19_1
|
||||
if (environment.params.worldGenSettings.generateStructures()) {
|
||||
#endif
|
||||
for (ChunkAccess chunk : chunksToDo) {
|
||||
// System.out.println("StepStructureStart: "+chunk.getPos());
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
environment.params.generator.createStructures(environment.params.registry, tParams.structFeat, chunk, environment.params.structures,
|
||||
environment.params.worldSeed);
|
||||
#elif POST_MC_1_19
|
||||
#elif POST_MC_1_19_1
|
||||
environment.params.generator.createStructures(environment.params.registry, environment.params.randomState, tParams.structFeat, chunk, environment.params.structures,
|
||||
environment.params.worldSeed);
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public final class StepSurface {
|
||||
// System.out.println("StepSurface: "+chunk.getPos());
|
||||
#if PRE_MC_1_18_1
|
||||
environment.params.generator.buildSurfaceAndBedrock(worldGenRegion, chunk);
|
||||
#elif PRE_MC_1_19
|
||||
#elif PRE_MC_1_19_1
|
||||
environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk);
|
||||
#else
|
||||
environment.params.generator.buildSurface(worldGenRegion, tParams.structFeat.forWorldGenRegion(worldGenRegion), environment.params.randomState, chunk);
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ dependencies {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
if (rootProject.minecraft_version != "1.19")
|
||||
if (rootProject.minecraft_version != "1.19.1")
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
else
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
|
||||
@@ -49,7 +49,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_1
|
||||
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) {
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
|
||||
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_1
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
#endif
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
@@ -69,7 +69,7 @@ public class MixinOptionsScreen extends Screen {
|
||||
// For now it goes to the client option by default
|
||||
(buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(ConfigGui.getScreen(this, "client")),
|
||||
// Add a title to the screen
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
new TranslatableComponent("text.autoconfig." + ModInfo.ID + ".title")));
|
||||
#else
|
||||
Component.translatable("text.autoconfig." + ModInfo.ID + ".title")));
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ dependencies {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
if (rootProject.minecraft_version != "1.19")
|
||||
if (rootProject.minecraft_version != "1.19.1")
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
else
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
|
||||
@@ -35,7 +35,7 @@ import com.seibel.lod.common.wrappers.world.WorldWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.client.event.InputEvent;
|
||||
import net.minecraftforge.event.TickEvent;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.event.world.ChunkEvent;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
@@ -70,7 +70,7 @@ public class ForgeClientProxy
|
||||
@SubscribeEvent
|
||||
public void chunkLoadEvent(ChunkEvent.Load event)
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
clientApi.clientChunkLoadEvent(new ChunkWrapper(event.getChunk(), event.getWorld()), WorldWrapper.getWorldWrapper(event.getWorld()));
|
||||
#else
|
||||
clientApi.clientChunkLoadEvent(new ChunkWrapper(event.getChunk(), event.getLevel()), WorldWrapper.getWorldWrapper(event.getLevel()));
|
||||
@@ -78,7 +78,7 @@ public class ForgeClientProxy
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
public void worldSaveEvent(WorldEvent.Save event)
|
||||
#else
|
||||
public void worldSaveEvent(LevelEvent.Save event)
|
||||
@@ -89,14 +89,14 @@ public class ForgeClientProxy
|
||||
|
||||
/** This is also called when a new dimension loads */
|
||||
@SubscribeEvent
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
public void worldLoadEvent(WorldEvent.Load event)
|
||||
#else
|
||||
public void worldLoadEvent(LevelEvent.Load event)
|
||||
#endif
|
||||
{
|
||||
if (Minecraft.getInstance().screen instanceof TitleScreen) return;
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
if (event.getWorld() != null) {
|
||||
eventApi.worldLoadEvent(WorldWrapper.getWorldWrapper(event.getWorld()));
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class ForgeClientProxy
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
public void worldUnloadEvent(WorldEvent.Unload event)
|
||||
{
|
||||
eventApi.worldUnloadEvent(WorldWrapper.getWorldWrapper(event.getWorld()));
|
||||
@@ -130,7 +130,7 @@ public class ForgeClientProxy
|
||||
event.getClass() == BlockEvent.FluidPlaceBlockEvent.class ||
|
||||
event.getClass() == BlockEvent.PortalSpawnEvent.class)
|
||||
{
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
IChunkWrapper chunk = new ChunkWrapper(event.getWorld().getChunk(event.getPos()), event.getWorld());
|
||||
DimensionTypeWrapper dimType = DimensionTypeWrapper.getDimensionTypeWrapper(event.getWorld().dimensionType());
|
||||
#else
|
||||
@@ -144,7 +144,7 @@ public class ForgeClientProxy
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKeyInput(#if PRE_MC_1_19 InputEvent.KeyInputEvent event #else InputEvent.Key event #endif)
|
||||
public void onKeyInput(#if PRE_MC_1_19_1 InputEvent.KeyInputEvent event #else InputEvent.Key event #endif)
|
||||
{
|
||||
if (Minecraft.getInstance().player == null) return;
|
||||
if (event.getAction() != GLFW.GLFW_PRESS) return;
|
||||
|
||||
@@ -49,14 +49,14 @@ import net.minecraftforge.fml.loading.FMLLoader;
|
||||
import net.minecraftforge.fml.ExtensionPoint;
|
||||
#elif MC_1_17_1
|
||||
import net.minecraftforge.fmlclient.ConfigGuiHandler;
|
||||
#elif POST_MC_1_19
|
||||
#elif POST_MC_1_19_1
|
||||
import net.minecraftforge.client.ConfigScreenHandler;
|
||||
#else // 1.18+ untill 1.19
|
||||
import net.minecraftforge.client.ConfigGuiHandler;
|
||||
#endif
|
||||
|
||||
// these imports change due to forge refactoring classes in 1.19
|
||||
#if POST_MC_1_19
|
||||
#if POST_MC_1_19_1
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraftforge.client.model.data.ModelData;
|
||||
@@ -109,7 +109,7 @@ public class ForgeMain implements LodForgeMethodCaller
|
||||
#if PRE_MC_1_17_1
|
||||
ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY,
|
||||
() -> (client, parent) -> ConfigGui.getScreen(parent, ""));
|
||||
#elif POST_MC_1_19
|
||||
#elif POST_MC_1_19_1
|
||||
ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class,
|
||||
() -> new ConfigScreenHandler.ConfigScreenFactory((client, parent) -> ConfigGui.getScreen(parent, "")));
|
||||
#else
|
||||
@@ -120,21 +120,21 @@ public class ForgeMain implements LodForgeMethodCaller
|
||||
MinecraftForge.EVENT_BUS.register(forgeClientProxy);
|
||||
}
|
||||
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
private final ModelDataMap modelData = new ModelDataMap.Builder().build();
|
||||
#else
|
||||
private final ModelData modelData = ModelData.EMPTY;
|
||||
#endif
|
||||
|
||||
@Override
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
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_1, RenderType.solid() #endif);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class MixinFogRenderer
|
||||
method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V",
|
||||
remap = // Remap messiness due to this being added by forge.
|
||||
#if MC_1_16_5 true
|
||||
#elif PRE_MC_1_19 false
|
||||
#elif PRE_MC_1_19_1 false
|
||||
#else true #endif
|
||||
)
|
||||
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback)
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
|
||||
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_1
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
#endif
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
@@ -69,7 +69,7 @@ public class MixinOptionsScreen extends Screen {
|
||||
// For now it goes to the client option by default
|
||||
(buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(ConfigGui.getScreen(this, "client")),
|
||||
// Add a title to the screen
|
||||
#if PRE_MC_1_19
|
||||
#if PRE_MC_1_19_1
|
||||
new TranslatableComponent("text.autoconfig." + ModInfo.ID + ".title")));
|
||||
#else
|
||||
Component.translatable("text.autoconfig." + ModInfo.ID + ".title")));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
modLoader="javafml" #//mandatory
|
||||
loaderVersion="[36,42)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
loaderVersion="[40,43)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
license="GNU GPLv3"
|
||||
issueTrackerURL="${issues}"
|
||||
|
||||
@@ -15,7 +15,7 @@ issueTrackerURL="${issues}"
|
||||
description= "${description}" #//mandatory. The description text for the mod
|
||||
logoFile="logo.png"
|
||||
catalogueImageIcon="icon.png"
|
||||
credits="Leonardo, Cola, Ran, CoolGi, and Leetom. Without their hard work, Distant Horizons wouldn't be the mod it is today."
|
||||
credits="Leonardo, Cola, Ran, coolGi, and Leetom. Without their hard work, Distant Horizons wouldn't be the mod it is today."
|
||||
#// if not set defaults to "false"
|
||||
clientSideOnly="true"
|
||||
#// if not set defaults to "BOTH"
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues
|
||||
toml_version=3.6.4
|
||||
manifold_version=2022.1.18
|
||||
enabled_platforms=fabric,forge
|
||||
mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19
|
||||
mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19.1
|
||||
|
||||
##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS:
|
||||
mcVer=1.19
|
||||
mcVer=1.19.1
|
||||
Reference in New Issue
Block a user