mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-05-20 16:50:28 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c2cf4e85f1 | |||
| 32c835bc8f | |||
| a26771b1be | |||
| 06457bf3ce | |||
| b63f5f4a8f | |||
| 8cf766e77b | |||
| a23d624ab9 | |||
| c20b1eaf10 | |||
| 72f761678a | |||
| 62317a2f3f |
@@ -39,9 +39,6 @@ fun Project.configureDependencies() {
|
||||
maven("https://repo.papermc.io/repository/maven-public/") {
|
||||
name = "PaperMC"
|
||||
}
|
||||
maven("https://files.minecraftforge.net/maven/") {
|
||||
name = "Forge"
|
||||
}
|
||||
maven("https://maven.quiltmc.org/repository/release/") {
|
||||
name = "Quilt"
|
||||
}
|
||||
@@ -51,6 +48,9 @@ fun Project.configureDependencies() {
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||
name = "Sonatype Snapshots"
|
||||
}
|
||||
maven ("https://maven.neoforged.net/releases/") {
|
||||
name = "Neoforged"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -27,7 +27,8 @@ fun Project.configureDistribution() {
|
||||
group = "terra"
|
||||
doFirst {
|
||||
file("${buildDir}/resources/main/packs/").deleteRecursively()
|
||||
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/" + Versions.Terra.overworldConfig + "/default.zip")
|
||||
val defaultPackUrl =
|
||||
URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/" + Versions.Terra.overworldConfig + "/default.zip")
|
||||
downloadPack(defaultPackUrl, project)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ object Versions {
|
||||
const val strata = "1.3.2"
|
||||
|
||||
const val cloud = "2.0.0"
|
||||
const val cloudPaper = "2.0.0-beta.10"
|
||||
const val cloudFabric = "2.0.0-beta.9"
|
||||
|
||||
const val caffeine = "3.1.8"
|
||||
|
||||
@@ -28,15 +26,6 @@ object Versions {
|
||||
}
|
||||
}
|
||||
|
||||
object Fabric {
|
||||
const val fabricAPI = "0.104.0+${Mod.minecraft}"
|
||||
}
|
||||
//
|
||||
// object Quilt {
|
||||
// const val quiltLoader = "0.20.2"
|
||||
// const val fabricApi = "7.3.1+0.89.3-1.20.1"
|
||||
// }
|
||||
|
||||
object Mod {
|
||||
const val mixin = "0.15.3+mixin.0.8.7"
|
||||
|
||||
@@ -47,11 +36,18 @@ object Versions {
|
||||
const val architecuryLoom = "1.7.413"
|
||||
const val architecturyPlugin = "3.4.159"
|
||||
}
|
||||
//
|
||||
// object Forge {
|
||||
// const val forge = "${Mod.minecraft}-48.0.13"
|
||||
// const val burningwave = "12.63.0"
|
||||
// }
|
||||
|
||||
object Fabric {
|
||||
const val cloud = "2.0.0-beta.9"
|
||||
const val fabricAPI = "0.104.0+${Mod.minecraft}"
|
||||
}
|
||||
|
||||
object NeoForge {
|
||||
const val cloud = "2.0.0-beta.9"
|
||||
const val neoForge = "21.1.56"
|
||||
const val burningwave = "12.65.2"
|
||||
const val yarnPatch = "1.21+build.4"
|
||||
}
|
||||
|
||||
object Bukkit {
|
||||
const val minecraft = "1.21.1"
|
||||
@@ -61,6 +57,7 @@ object Versions {
|
||||
const val reflectionRemapper = "0.1.1"
|
||||
const val paperDevBundle = paperBuild
|
||||
const val runPaper = "2.3.1"
|
||||
const val cloud = "2.0.0-beta.10"
|
||||
const val paperWeight = "1.7.2"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class BiomePipelineTemplate implements ObjectTemplate<BiomeProvider> {
|
||||
@Default
|
||||
@Description("""
|
||||
The resolution at which to sample biomes.
|
||||
|
||||
|
||||
Larger values are quadratically faster, but produce lower quality results.
|
||||
For example, a value of 3 would sample every 3 blocks.""")
|
||||
protected @Meta int resolution = 1;
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.api.delegate;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.Biome;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import com.dfsek.terra.api.world.biome.Biome;
|
||||
|
||||
|
||||
final class SelfDelegate implements BiomeDelegate {
|
||||
public static final SelfDelegate INSTANCE = new SelfDelegate();
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class BiomePipelineTemplate extends BiomeProviderTemplate {
|
||||
@Description("""
|
||||
The initial size of biome chunks. This value must be at least 2.
|
||||
<b>This is not the final size of biome chunks. Final chunks will be much larger</b>.
|
||||
|
||||
|
||||
It is recommended to keep biome chunks' final size in the range of [50, 300]
|
||||
to prevent performance issues. To calculate the size of biome chunks, simply
|
||||
take initial-size and for each expand stage, multiply the running value by 2
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvi
|
||||
@Default
|
||||
@Description("""
|
||||
The resolution at which to sample biomes.
|
||||
|
||||
|
||||
Larger values are quadratically faster, but produce lower quality results.
|
||||
For example, a value of 3 would sample every 3 blocks.""")
|
||||
protected @Meta int resolution = 1;
|
||||
|
||||
+2
-4
@@ -8,17 +8,15 @@
|
||||
package com.dfsek.terra.addons.chunkgenerator.generation;
|
||||
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.slant.SlantHolder;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.SlantCalculationMethod;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.config.noise.BiomeNoiseProperties;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.SlantCalculationMethod;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation.LazilyEvaluatedInterpolator;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.Sampler3D;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.SamplerProvider;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.BiomePaletteInfo;
|
||||
import com.dfsek.terra.addons.chunkgenerator.palette.slant.SlantHolder;
|
||||
import com.dfsek.terra.api.Platform;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
|
||||
+3
-3
@@ -1,5 +1,8 @@
|
||||
package com.dfsek.terra.addons.commands.addons;
|
||||
|
||||
import org.incendo.cloud.CommandManager;
|
||||
import org.incendo.cloud.description.Description;
|
||||
|
||||
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
||||
import com.dfsek.terra.api.Platform;
|
||||
import com.dfsek.terra.api.addon.BaseAddon;
|
||||
@@ -9,9 +12,6 @@ import com.dfsek.terra.api.event.events.platform.CommandRegistrationEvent;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.inject.annotations.Inject;
|
||||
|
||||
import org.incendo.cloud.CommandManager;
|
||||
import org.incendo.cloud.description.Description;
|
||||
|
||||
|
||||
public class AddonsCommandAddon implements AddonInitializer {
|
||||
@Inject
|
||||
|
||||
+7
-7
@@ -1,5 +1,12 @@
|
||||
package com.dfsek.terra.addons.commands.structure;
|
||||
|
||||
import org.incendo.cloud.CommandManager;
|
||||
import org.incendo.cloud.component.DefaultValue;
|
||||
import org.incendo.cloud.context.CommandContext;
|
||||
import org.incendo.cloud.description.Description;
|
||||
import org.incendo.cloud.parser.standard.EnumParser;
|
||||
import org.incendo.cloud.parser.standard.LongParser;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
||||
@@ -16,13 +23,6 @@ import com.dfsek.terra.api.structure.Structure;
|
||||
import com.dfsek.terra.api.util.Rotation;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
|
||||
import org.incendo.cloud.CommandManager;
|
||||
import org.incendo.cloud.component.DefaultValue;
|
||||
import org.incendo.cloud.context.CommandContext;
|
||||
import org.incendo.cloud.description.Description;
|
||||
import org.incendo.cloud.parser.standard.EnumParser;
|
||||
import org.incendo.cloud.parser.standard.LongParser;
|
||||
|
||||
|
||||
public class StructureCommandAddon implements AddonInitializer {
|
||||
@Inject
|
||||
|
||||
+8
-31
@@ -9,44 +9,17 @@ package com.dfsek.terra.addons.noise;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
||||
import com.dfsek.terra.addons.noise.config.CubicSplinePointTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.DimensionApplicableNoiseSampler;
|
||||
import com.dfsek.terra.addons.noise.config.templates.BinaryArithmeticTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.DomainWarpTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.FunctionTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.ImageSamplerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.KernelTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.LinearHeightmapSamplerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.TranslateSamplerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.CellularNoiseTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.ConstantNoiseTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.DistanceSamplerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.ExpressionFunctionTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.GaborNoiseTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.SimpleNoiseTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.*;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.*;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.fractal.BrownianMotionTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.fractal.PingPongTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.noise.fractal.RidgedFractalTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.ClampNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.CubicSplineNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.ExpressionNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.LinearNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.NormalNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.PosterizationNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.ProbabilityNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.ScaleNormalizerTemplate;
|
||||
import com.dfsek.terra.addons.noise.config.templates.normalizer.*;
|
||||
import com.dfsek.terra.addons.noise.math.CubicSpline;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.AdditionSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.DivisionSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.MaxSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.MinSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.MultiplicationSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.SubtractionSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.arithmetic.*;
|
||||
import com.dfsek.terra.addons.noise.samplers.noise.CellularSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.noise.DistanceSampler;
|
||||
import com.dfsek.terra.addons.noise.samplers.noise.random.GaussianNoiseSampler;
|
||||
@@ -67,6 +40,10 @@ import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
import com.dfsek.terra.api.registry.CheckedRegistry;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class NoiseAddon implements AddonInitializer {
|
||||
public static final TypeKey<Supplier<ObjectTemplate<NoiseSampler>>> NOISE_SAMPLER_TOKEN = new TypeKey<>() {
|
||||
|
||||
+5
-4
@@ -8,15 +8,16 @@
|
||||
package com.dfsek.terra.addons.noise.config.templates;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import com.dfsek.terra.addons.noise.samplers.ImageSampler;
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
|
||||
@SuppressWarnings({ "unused", "FieldMayBeFinal" })
|
||||
public class ImageSamplerTemplate extends SamplerTemplate<ImageSampler> {
|
||||
|
||||
+11
-4
@@ -11,6 +11,8 @@ import com.dfsek.terra.addons.noise.config.templates.FunctionTemplate;
|
||||
import com.dfsek.terra.addons.noise.paralithic.defined.UserDefinedFunction;
|
||||
import com.dfsek.terra.addons.noise.paralithic.noise.NoiseFunction2;
|
||||
import com.dfsek.terra.addons.noise.paralithic.noise.NoiseFunction3;
|
||||
import com.dfsek.terra.addons.noise.paralithic.noise.SaltedNoiseFunction2;
|
||||
import com.dfsek.terra.addons.noise.paralithic.noise.SaltedNoiseFunction3;
|
||||
|
||||
|
||||
public class FunctionUtil {
|
||||
@@ -23,10 +25,15 @@ public class FunctionUtil {
|
||||
for(Map.Entry<String, FunctionTemplate> entry : functions.entrySet()) {
|
||||
functionMap.put(entry.getKey(), UserDefinedFunction.newInstance(entry.getValue()));
|
||||
}
|
||||
samplers.forEach((id, sampler) -> functionMap.put(id,
|
||||
sampler.getDimensions() == 2 ?
|
||||
new NoiseFunction2(sampler.getSampler()) :
|
||||
new NoiseFunction3(sampler.getSampler())));
|
||||
samplers.forEach((id, sampler) -> {
|
||||
if(sampler.getDimensions() == 2) {
|
||||
functionMap.put(id, new NoiseFunction2(sampler.getSampler()));
|
||||
functionMap.put(id + "Salted", new SaltedNoiseFunction2(sampler.getSampler()));
|
||||
} else {
|
||||
functionMap.put(id, new NoiseFunction3(sampler.getSampler()));
|
||||
functionMap.put(id + "Salted", new SaltedNoiseFunction3(sampler.getSampler()));
|
||||
}
|
||||
});
|
||||
return functionMap;
|
||||
}
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.dfsek.terra.addons.noise.paralithic.noise;
|
||||
|
||||
import com.dfsek.paralithic.functions.dynamic.Context;
|
||||
import com.dfsek.paralithic.functions.dynamic.DynamicFunction;
|
||||
import com.dfsek.paralithic.node.Statefulness;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
|
||||
|
||||
public class SaltedNoiseFunction2 implements DynamicFunction {
|
||||
private final NoiseSampler gen;
|
||||
|
||||
public SaltedNoiseFunction2(NoiseSampler gen) {
|
||||
this.gen = gen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double eval(double... args) {
|
||||
throw new UnsupportedOperationException("Cannot evaluate seeded function without seed context.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double eval(Context context, double... args) {
|
||||
return gen.noise(((SeedContext) context).getSeed() + (long) args[2], args[0], args[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArgNumber() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Statefulness statefulness() {
|
||||
return Statefulness.CONTEXTUAL;
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.dfsek.terra.addons.noise.paralithic.noise;
|
||||
|
||||
import com.dfsek.paralithic.functions.dynamic.Context;
|
||||
import com.dfsek.paralithic.functions.dynamic.DynamicFunction;
|
||||
import com.dfsek.paralithic.node.Statefulness;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
|
||||
|
||||
public class SaltedNoiseFunction3 implements DynamicFunction {
|
||||
private final NoiseSampler gen;
|
||||
|
||||
public SaltedNoiseFunction3(NoiseSampler gen) {
|
||||
this.gen = gen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double eval(double... args) {
|
||||
throw new UnsupportedOperationException("Cannot evaluate seeded function without seed context.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double eval(Context context, double... args) {
|
||||
return gen.noise(((SeedContext) context).getSeed() + (long) args[3], args[0], args[1], args[2]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArgNumber() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Statefulness statefulness() {
|
||||
return Statefulness.CONTEXTUAL;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -62,7 +62,7 @@ public class FeatureGenerationStage implements GenerationStage, StringIdentifiab
|
||||
world.getBiomeProvider()
|
||||
.getColumn(
|
||||
tx + (doBlending ? (int) (blendSampler.noise(seed, tx, tz) * blendAmplitude) : 0),
|
||||
tz + (doBlending ? (int) (blendSampler.noise(seed+1, tx, tz) * blendAmplitude) : 0),
|
||||
tz + (doBlending ? (int) (blendSampler.noise(seed + 1, tx, tz) * blendAmplitude) : 0),
|
||||
world)
|
||||
.forRanges(resolution, (min, max, biome) -> {
|
||||
for(int subChunkX = 0; subChunkX < resolution; subChunkX++) {
|
||||
|
||||
+4
-4
@@ -7,15 +7,15 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.exceptions.ParseException;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Token;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.exceptions.ParseException;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Token;
|
||||
|
||||
|
||||
public class ParserUtil {
|
||||
|
||||
|
||||
+12
-13
@@ -2,6 +2,15 @@ package com.dfsek.terra.api.command.arguments;
|
||||
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.incendo.cloud.component.CommandComponent;
|
||||
import org.incendo.cloud.component.DefaultValue;
|
||||
import org.incendo.cloud.context.CommandContext;
|
||||
import org.incendo.cloud.context.CommandInput;
|
||||
import org.incendo.cloud.parser.ArgumentParseResult;
|
||||
import org.incendo.cloud.parser.ArgumentParser;
|
||||
import org.incendo.cloud.parser.ParserDescriptor;
|
||||
import org.incendo.cloud.suggestion.Suggestion;
|
||||
import org.incendo.cloud.suggestion.SuggestionProvider;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -13,16 +22,6 @@ import com.dfsek.terra.api.registry.exception.NoSuchEntryException;
|
||||
import com.dfsek.terra.api.registry.key.RegistryKey;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
|
||||
import org.incendo.cloud.component.CommandComponent;
|
||||
import org.incendo.cloud.component.DefaultValue;
|
||||
import org.incendo.cloud.context.CommandContext;
|
||||
import org.incendo.cloud.context.CommandInput;
|
||||
import org.incendo.cloud.parser.ArgumentParseResult;
|
||||
import org.incendo.cloud.parser.ArgumentParser;
|
||||
import org.incendo.cloud.parser.ParserDescriptor;
|
||||
import org.incendo.cloud.suggestion.Suggestion;
|
||||
import org.incendo.cloud.suggestion.SuggestionProvider;
|
||||
|
||||
|
||||
public class RegistryArgument {
|
||||
|
||||
@@ -49,17 +48,17 @@ public class RegistryArgument {
|
||||
}
|
||||
|
||||
public static <T, R> CommandComponent<T> of(String name, Function<CommandContext<T>, Registry<R>> registryFunction,
|
||||
TypeKey<R> registryType) {
|
||||
TypeKey<R> registryType) {
|
||||
return RegistryArgument.<T, R>builder(name, registryFunction, registryType).build();
|
||||
}
|
||||
|
||||
public static <T, R> CommandComponent<T> optional(String name, Function<CommandContext<T>, Registry<R>> registryFunction,
|
||||
TypeKey<R> registryType) {
|
||||
TypeKey<R> registryType) {
|
||||
return RegistryArgument.builder(name, registryFunction, registryType).optional().build();
|
||||
}
|
||||
|
||||
public static <T, R> CommandComponent<T> optional(String name, Function<CommandContext<T>, Registry<R>> registryFunction,
|
||||
TypeKey<R> registryType, DefaultValue<T, R> defaultKey) {
|
||||
TypeKey<R> registryType, DefaultValue<T, R> defaultKey) {
|
||||
return RegistryArgument.builder(name, registryFunction, registryType).optional(defaultKey).build();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.dfsek.terra.api.event.events.platform;
|
||||
|
||||
import org.incendo.cloud.CommandManager;
|
||||
|
||||
import com.dfsek.terra.api.command.CommandSender;
|
||||
import com.dfsek.terra.api.event.events.Event;
|
||||
|
||||
import org.incendo.cloud.CommandManager;
|
||||
|
||||
|
||||
public class CommandRegistrationEvent implements Event {
|
||||
private final CommandManager<CommandSender> commandManager;
|
||||
|
||||
@@ -30,11 +30,11 @@ public final class ReflectionUtil {
|
||||
private static final Unsafe UNSAFE;
|
||||
|
||||
static {
|
||||
try{
|
||||
try {
|
||||
final Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe");
|
||||
unsafeField.setAccessible(true);
|
||||
UNSAFE = (Unsafe) unsafeField.get(null);
|
||||
} catch(NoSuchFieldException | IllegalAccessException e){
|
||||
} catch(NoSuchFieldException | IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-11
@@ -17,17 +17,6 @@
|
||||
|
||||
package com.dfsek.terra.event;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.api.addon.BaseAddon;
|
||||
import com.dfsek.terra.api.event.events.Event;
|
||||
import com.dfsek.terra.api.event.events.FailThroughEvent;
|
||||
@@ -36,6 +25,12 @@ import com.dfsek.terra.api.event.functional.EventContext;
|
||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
public class FunctionalEventHandlerImpl implements FunctionalEventHandler {
|
||||
private static final Logger logger = LoggerFactory.getLogger(FunctionalEventHandlerImpl.class);
|
||||
|
||||
@@ -11,5 +11,5 @@ dependencies {
|
||||
|
||||
shadedApi("com.google.guava", "guava", Versions.Libraries.Internal.guava)
|
||||
|
||||
shadedApi("org.incendo", "cloud-paper", Versions.Libraries.cloudPaper)
|
||||
shadedApi("org.incendo", "cloud-paper", Versions.Bukkit.cloud)
|
||||
}
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
|
||||
package com.dfsek.terra.bukkit;
|
||||
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import com.dfsek.terra.api.entity.Entity;
|
||||
import com.dfsek.terra.api.util.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.ServerWorld;
|
||||
import com.dfsek.terra.bukkit.world.BukkitAdapter;
|
||||
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.Location;
|
||||
|
||||
|
||||
public class BukkitEntity implements Entity {
|
||||
private final org.bukkit.entity.Entity entity;
|
||||
|
||||
@@ -79,7 +79,7 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
} catch(Exception e) { // This should never happen.
|
||||
logger.error("""
|
||||
TERRA HAS BEEN DISABLED
|
||||
|
||||
|
||||
Errors occurred while registering commands.
|
||||
Please report this to Terra.
|
||||
""".strip(), e);
|
||||
@@ -102,13 +102,13 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
BukkitAdapter::adapt
|
||||
));
|
||||
|
||||
if (commandManager.hasCapability(CloudBukkitCapabilities.NATIVE_BRIGADIER)) {
|
||||
if(commandManager.hasCapability(CloudBukkitCapabilities.NATIVE_BRIGADIER)) {
|
||||
commandManager.registerBrigadier();
|
||||
final CloudBrigadierManager<?, ?> brigManager = commandManager.brigadierManager();
|
||||
if(brigManager != null) {
|
||||
brigManager.setNativeNumberSuggestions(false);
|
||||
}
|
||||
} else if (commandManager.hasCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)) {
|
||||
} else if(commandManager.hasCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)) {
|
||||
commandManager.registerAsynchronousCompletions();
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
logger.warn("""
|
||||
You are using Mohist, so we will not give you any support for issues that may arise.
|
||||
Since you enabled the "IKnowMohistCausesLotsOfIssuesButIWillUseItAnyways" flag, we won't disable Terra. But be warned.
|
||||
|
||||
|
||||
> I felt a great disturbance in the JVM, as if millions of plugins suddenly cried out in stack traces and were suddenly silenced.
|
||||
> I fear something terrible has happened.
|
||||
> - Astrash
|
||||
@@ -194,7 +194,7 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
@Override
|
||||
public @Nullable
|
||||
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
|
||||
if (id == null || id.trim().equals("")) { return null; }
|
||||
if(id == null || id.trim().equals("")) { return null; }
|
||||
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
|
||||
ConfigPack pack = platform.getConfigRegistry().getByID(id).orElseThrow(
|
||||
() -> new IllegalArgumentException("No such config pack \"" + id + "\""));
|
||||
|
||||
+3
-2
@@ -61,8 +61,9 @@ public class BukkitWorldHandle implements WorldHandle {
|
||||
|
||||
@Override
|
||||
public @NotNull EntityType getEntity(@NotNull String id) {
|
||||
if (!id.contains(":")) { //TODO: remove in 7.0
|
||||
String newid = "minecraft:" + id.toLowerCase();;
|
||||
if(!id.contains(":")) { //TODO: remove in 7.0
|
||||
String newid = "minecraft:" + id.toLowerCase();
|
||||
;
|
||||
logger.warn(
|
||||
"Translating " + id + " to " + newid + ". In 1.20.3 entity parsing was reworked" +
|
||||
". You are advised to perform this rename in your config backs as this translation will be removed in the next major " +
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.dfsek.terra.bukkit.nms;
|
||||
|
||||
import com.dfsek.terra.bukkit.util.VersionUtil;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.dfsek.terra.bukkit.PlatformImpl;
|
||||
import com.dfsek.terra.bukkit.util.VersionUtil;
|
||||
|
||||
|
||||
public interface Initializer {
|
||||
@@ -16,7 +15,7 @@ public interface Initializer {
|
||||
Logger logger = LoggerFactory.getLogger(Initializer.class);
|
||||
try {
|
||||
String packageVersion = NMS;
|
||||
if (NMS.equals("v1_21_1")) {
|
||||
if(NMS.equals("v1_21_1")) {
|
||||
packageVersion = "v1_21";
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public final class VersionUtil {
|
||||
if(major == -1 && minor == -1 && patch == -1)
|
||||
return "Unknown";
|
||||
|
||||
if (patch >= 0) {
|
||||
if(patch >= 0) {
|
||||
return String.format("v%d.%d.%d", major, minor, patch);
|
||||
} else {
|
||||
return String.format("v%d.%d", major, minor);
|
||||
|
||||
+2
-2
@@ -10,7 +10,6 @@ import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.slf4j.Logger;
|
||||
@@ -42,7 +41,8 @@ public class AwfulBukkitHacks {
|
||||
try {
|
||||
BukkitPlatformBiome platformBiome = (BukkitPlatformBiome) biome.getPlatformBiome();
|
||||
NamespacedKey vanillaBukkitKey = platformBiome.getHandle().getKey();
|
||||
ResourceLocation vanillaMinecraftKey = ResourceLocation.fromNamespaceAndPath(vanillaBukkitKey.getNamespace(), vanillaBukkitKey.getKey());
|
||||
ResourceLocation vanillaMinecraftKey = ResourceLocation.fromNamespaceAndPath(vanillaBukkitKey.getNamespace(),
|
||||
vanillaBukkitKey.getKey());
|
||||
Biome platform = NMSBiomeInjector.createBiome(biome, Objects.requireNonNull(biomeRegistry.get(vanillaMinecraftKey)));
|
||||
|
||||
ResourceKey<Biome> delegateKey = ResourceKey.create(
|
||||
|
||||
+4
-4
@@ -37,10 +37,10 @@ public class NMSBiomeProvider extends BiomeSource {
|
||||
@Override
|
||||
protected @NotNull MapCodec<? extends BiomeSource> codec() {
|
||||
return MapCodec.assumeMapUnsafe(BiomeSource.CODEC);
|
||||
// return MapCodec.unit(null);
|
||||
// BuiltInRegistries.BIOME_SOURCE.byNameCodec().dispatchMap(this::codec, Function.identity());
|
||||
// BuiltInRegistries.BIOME_SOURCE.byNameCodec().dispatchStable(BiomeSource::codec, Function.identity());
|
||||
// return BiomeSource.CODEC;
|
||||
// return MapCodec.unit(null);
|
||||
// BuiltInRegistries.BIOME_SOURCE.byNameCodec().dispatchMap(this::codec, Function.identity());
|
||||
// BuiltInRegistries.BIOME_SOURCE.byNameCodec().dispatchStable(BiomeSource::codec, Function.identity());
|
||||
// return BiomeSource.CODEC;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-3
@@ -1,12 +1,9 @@
|
||||
package com.dfsek.terra.bukkit.nms.v1_21;
|
||||
|
||||
import com.dfsek.terra.api.util.reflection.ReflectionUtil;
|
||||
|
||||
import net.minecraft.server.level.ChunkMap;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.chunk.status.WorldGenContext;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -20,6 +17,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.util.reflection.ReflectionUtil;
|
||||
import com.dfsek.terra.bukkit.generator.BukkitChunkGeneratorWrapper;
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
loader("fabric")
|
||||
fabric()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -21,13 +21,13 @@ dependencies {
|
||||
shaded(project(path = ":platforms:mixin-lifecycle", configuration = "transformProductionFabric")) { isTransitive = false }
|
||||
|
||||
|
||||
minecraft("com.mojang:minecraft:${Versions.Mod.minecraft}")
|
||||
minecraft("com.mojang", "minecraft", Versions.Mod.minecraft)
|
||||
mappings("net.fabricmc:yarn:${Versions.Mod.yarn}:v2")
|
||||
|
||||
modImplementation("net.fabricmc:fabric-loader:${Versions.Mod.fabricLoader}")
|
||||
modImplementation("net.fabricmc", "fabric-loader", Versions.Mod.fabricLoader)
|
||||
|
||||
modImplementation("org.incendo", "cloud-fabric", Versions.Libraries.cloudFabric)
|
||||
include("org.incendo", "cloud-fabric", Versions.Libraries.cloudFabric)
|
||||
modImplementation("org.incendo", "cloud-fabric", Versions.Fabric.cloud)
|
||||
include("org.incendo", "cloud-fabric", Versions.Fabric.cloud)
|
||||
|
||||
modRuntimeOnly("net.fabricmc.fabric-api", "fabric-api", Versions.Fabric.fabricAPI)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"fabricloader": ">=0.16.5",
|
||||
"java": ">=21",
|
||||
"minecraft": ">=1.20.6",
|
||||
"cloud": "*",
|
||||
"fabric": "*"
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
id("dev.architectury.loom") version Versions.Mod.architecuryLoom
|
||||
id("architectury-plugin") version Versions.Mod.architecturyPlugin
|
||||
id("io.github.juuxel.loom-vineflower") version Versions.Mod.loomVineflower
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
loader("forge")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
annotationProcessor("net.fabricmc:sponge-mixin:${Versions.Mod.mixin}")
|
||||
annotationProcessor("dev.architectury:architectury-loom:${Versions.Mod.architecuryLoom}")
|
||||
|
||||
shadedApi(project(":common:implementation:base"))
|
||||
"forgeRuntimeLibrary"(project(":common:implementation:base"))
|
||||
|
||||
implementation(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
|
||||
"developmentForge"(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
|
||||
shaded(project(path = ":platforms:mixin-common", configuration = "transformProductionForge")) { isTransitive = false }
|
||||
|
||||
forge(group = "net.minecraftforge", name = "forge", version = Versions.Forge.forge)
|
||||
|
||||
minecraft("com.mojang:minecraft:${Versions.Mod.minecraft}")
|
||||
mappings("net.fabricmc:yarn:${Versions.Mod.yarn}:v2")
|
||||
|
||||
//forge is not ok.
|
||||
compileOnly("org.burningwave:core:${Versions.Forge.burningwave}")
|
||||
"forgeRuntimeLibrary"("org.burningwave:core:${Versions.Forge.burningwave}")
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath.set(project(":platforms:mixin-common").file("src/main/resources/terra.accesswidener"))
|
||||
|
||||
mixin {
|
||||
defaultRefmapName.set("terra.forge.refmap.json")
|
||||
}
|
||||
|
||||
// launches {
|
||||
// named("client") {
|
||||
// property("fabric.log.level", "info")
|
||||
// property("mixin.env.disableRefMap", "true")
|
||||
// }
|
||||
// named("server") {
|
||||
// property("fabric.log.level", "info")
|
||||
// property("mixin.env.disableRefMap", "true")
|
||||
// }
|
||||
// }
|
||||
|
||||
forge {
|
||||
convertAccessWideners.set(true)
|
||||
mixinConfig("terra.common.mixins.json")
|
||||
mixinConfig("terra.forge.mixins.json")
|
||||
extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
addonDir(project.file("./run/config/Terra/addons"), tasks.named("configureLaunch").get())
|
||||
|
||||
tasks {
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
mapOf(
|
||||
"Implementation-Title" to rootProject.name,
|
||||
"Implementation-Version" to project.version,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
archiveFileName.set("${rootProject.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}-forge-${project.version}.jar")
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
loom.platform=forge
|
||||
@@ -23,7 +23,7 @@ dependencies {
|
||||
}
|
||||
|
||||
architectury {
|
||||
common("fabric")
|
||||
common("fabric", "neoforge")
|
||||
minecraft = Versions.Mod.minecraft
|
||||
}
|
||||
|
||||
|
||||
@@ -68,32 +68,32 @@ public abstract class ModPlatform extends AbstractPlatform {
|
||||
public void register(TypeRegistry registry) {
|
||||
super.register(registry);
|
||||
registry.registerLoader(PlatformBiome.class, (type, o, loader, depthTracker) -> parseBiome((String) o, depthTracker))
|
||||
.registerLoader(Identifier.class, (type, o, loader, depthTracker) -> {
|
||||
Identifier identifier = Identifier.tryParse((String) o);
|
||||
if(identifier == null)
|
||||
throw new LoadException("Invalid identifier: " + o, depthTracker);
|
||||
return identifier;
|
||||
})
|
||||
.registerLoader(Precipitation.class, (type, o, loader, depthTracker) -> Precipitation.valueOf(((String) o).toUpperCase(
|
||||
Locale.ROOT)))
|
||||
.registerLoader(GrassColorModifier.class,
|
||||
(type, o, loader, depthTracker) -> GrassColorModifier.valueOf(((String) o).toUpperCase(
|
||||
Locale.ROOT)))
|
||||
.registerLoader(GrassColorModifier.class,
|
||||
(type, o, loader, depthTracker) -> TemperatureModifier.valueOf(((String) o).toUpperCase(
|
||||
Locale.ROOT)))
|
||||
.registerLoader(SpawnGroup.class,(type, o, loader, depthTracker) -> SpawnGroup.valueOf((String) o))
|
||||
.registerLoader(BiomeParticleConfig.class, BiomeParticleConfigTemplate::new)
|
||||
.registerLoader(SoundEvent.class, SoundEventTemplate::new)
|
||||
.registerLoader(BiomeMoodSound.class, BiomeMoodSoundTemplate::new)
|
||||
.registerLoader(BiomeAdditionsSound.class, BiomeAdditionsSoundTemplate::new)
|
||||
.registerLoader(MusicSound.class, MusicSoundTemplate::new)
|
||||
.registerLoader(EntityType.class, EntityTypeTemplate::new)
|
||||
.registerLoader(SpawnCostConfig.class, SpawnCostConfig::new)
|
||||
.registerLoader(SpawnEntry.class, SpawnEntryTemplate::new)
|
||||
.registerLoader(SpawnTypeConfig.class, SpawnTypeConfig::new)
|
||||
.registerLoader(SpawnSettings.class, SpawnSettingsTemplate::new)
|
||||
.registerLoader(VillagerType.class, VillagerTypeTemplate::new);
|
||||
.registerLoader(Identifier.class, (type, o, loader, depthTracker) -> {
|
||||
Identifier identifier = Identifier.tryParse((String) o);
|
||||
if(identifier == null)
|
||||
throw new LoadException("Invalid identifier: " + o, depthTracker);
|
||||
return identifier;
|
||||
})
|
||||
.registerLoader(Precipitation.class, (type, o, loader, depthTracker) -> Precipitation.valueOf(((String) o).toUpperCase(
|
||||
Locale.ROOT)))
|
||||
.registerLoader(GrassColorModifier.class,
|
||||
(type, o, loader, depthTracker) -> GrassColorModifier.valueOf(((String) o).toUpperCase(
|
||||
Locale.ROOT)))
|
||||
.registerLoader(GrassColorModifier.class,
|
||||
(type, o, loader, depthTracker) -> TemperatureModifier.valueOf(((String) o).toUpperCase(
|
||||
Locale.ROOT)))
|
||||
.registerLoader(SpawnGroup.class, (type, o, loader, depthTracker) -> SpawnGroup.valueOf((String) o))
|
||||
.registerLoader(BiomeParticleConfig.class, BiomeParticleConfigTemplate::new)
|
||||
.registerLoader(SoundEvent.class, SoundEventTemplate::new)
|
||||
.registerLoader(BiomeMoodSound.class, BiomeMoodSoundTemplate::new)
|
||||
.registerLoader(BiomeAdditionsSound.class, BiomeAdditionsSoundTemplate::new)
|
||||
.registerLoader(MusicSound.class, MusicSoundTemplate::new)
|
||||
.registerLoader(EntityType.class, EntityTypeTemplate::new)
|
||||
.registerLoader(SpawnCostConfig.class, SpawnCostConfig::new)
|
||||
.registerLoader(SpawnEntry.class, SpawnEntryTemplate::new)
|
||||
.registerLoader(SpawnTypeConfig.class, SpawnTypeConfig::new)
|
||||
.registerLoader(SpawnSettings.class, SpawnSettingsTemplate::new)
|
||||
.registerLoader(VillagerType.class, VillagerTypeTemplate::new);
|
||||
}
|
||||
|
||||
private ProtoPlatformBiome parseBiome(String id, DepthTracker tracker) throws LoadException {
|
||||
|
||||
+2
-1
@@ -28,7 +28,8 @@ public class BiomeParticleConfigTemplate implements ObjectTemplate<BiomeParticle
|
||||
|
||||
try {
|
||||
return new BiomeParticleConfig(
|
||||
ParticleEffectArgumentType.readParameters(new StringReader(particle), (RegistryWrapper.WrapperLookup) Registries.PARTICLE_TYPE.getReadOnlyWrapper()),
|
||||
ParticleEffectArgumentType.readParameters(new StringReader(particle),
|
||||
(RegistryWrapper.WrapperLookup) Registries.PARTICLE_TYPE.getReadOnlyWrapper()),
|
||||
probability);
|
||||
} catch(CommandSyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class SpawnSettingsTemplate implements ObjectTemplate<SpawnSettings> {
|
||||
SpawnSettings.Builder builder = new SpawnSettings.Builder();
|
||||
for(SpawnTypeConfig spawn : spawns) {
|
||||
SpawnGroup group = spawn.getGroup();
|
||||
for (SpawnEntry entry : spawn.getEntry()) {
|
||||
for(SpawnEntry entry : spawn.getEntry()) {
|
||||
builder.spawn(group, entry);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -13,15 +13,15 @@ public class SpawnTypeConfig implements ObjectTemplate<SpawnTypeConfig> {
|
||||
@Value("group")
|
||||
@Default
|
||||
private SpawnGroup group = null;
|
||||
|
||||
|
||||
@Value("entries")
|
||||
@Default
|
||||
private List<SpawnEntry> entry = null;
|
||||
|
||||
|
||||
public SpawnGroup getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
|
||||
public List<SpawnEntry> getEntry() {
|
||||
return entry;
|
||||
}
|
||||
|
||||
-2
@@ -17,7 +17,6 @@
|
||||
|
||||
package com.dfsek.terra.mod.generation;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
@@ -49,7 +48,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
-1
@@ -17,7 +17,6 @@
|
||||
|
||||
package com.dfsek.terra.mod.generation;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import net.minecraft.registry.entry.RegistryEntry;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
+2
-3
@@ -21,10 +21,8 @@ import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import net.minecraft.command.CommandRegistryAccess;
|
||||
import net.minecraft.command.argument.ItemStackArgumentType;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryWrapper;
|
||||
import net.minecraft.registry.RegistryWrapper.Impl;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
@@ -67,6 +65,7 @@ public class MinecraftItemHandle implements ItemHandle {
|
||||
|
||||
@Override
|
||||
public Set<Enchantment> getEnchantments() {
|
||||
return CommonPlatform.get().enchantmentRegistry().stream().map(enchantment -> (Enchantment) (Object) enchantment).collect(Collectors.toSet());
|
||||
return CommonPlatform.get().enchantmentRegistry().stream().map(enchantment -> (Enchantment) (Object) enchantment).collect(
|
||||
Collectors.toSet());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -64,8 +64,9 @@ public class MinecraftWorldHandle implements WorldHandle {
|
||||
|
||||
@Override
|
||||
public @NotNull EntityType getEntity(@NotNull String id) {
|
||||
if (!id.contains(":")) { //TODO: remove in 7.0
|
||||
String newid = "minecraft:" + id.toLowerCase();;
|
||||
if(!id.contains(":")) { //TODO: remove in 7.0
|
||||
String newid = "minecraft:" + id.toLowerCase();
|
||||
;
|
||||
logger.warn(
|
||||
"Translating " + id + " to " + newid + ". In 1.20.3 entity parsing was reworked" +
|
||||
". You are advised to perform this rename in your config packs as this translation will be removed in the next major " +
|
||||
|
||||
+3
-2
@@ -48,7 +48,8 @@ public abstract class MobSpawnerBlockEntityMixin extends BlockEntity {
|
||||
|
||||
@Shadow
|
||||
public abstract MobSpawnerLogic getLogic();
|
||||
//method_46408
|
||||
|
||||
//method_46408
|
||||
@Shadow
|
||||
public abstract void setEntityType(net.minecraft.entity.EntityType<?> entityType, Random random);
|
||||
|
||||
@@ -59,7 +60,7 @@ public abstract class MobSpawnerBlockEntityMixin extends BlockEntity {
|
||||
|
||||
public void terra$setSpawnedType(@NotNull EntityType creatureType) {
|
||||
Random rand;
|
||||
if (hasWorld()) {
|
||||
if(hasWorld()) {
|
||||
rand = world.getRandom();
|
||||
} else {
|
||||
rand = Random.create();
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package com.dfsek.terra.mod.mixin.implementations.terra.block.state;
|
||||
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap;
|
||||
import net.minecraft.block.AbstractBlock.AbstractBlockState;
|
||||
|
||||
+4
-7
@@ -17,13 +17,10 @@
|
||||
|
||||
package com.dfsek.terra.mod.mixin.implementations.terra.inventory.item;
|
||||
|
||||
import net.minecraft.component.Component;
|
||||
import net.minecraft.component.ComponentChanges;
|
||||
import net.minecraft.component.ComponentMap;
|
||||
import net.minecraft.component.ComponentMapImpl;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Implements;
|
||||
import org.spongepowered.asm.mixin.Interface;
|
||||
@@ -38,6 +35,10 @@ import com.dfsek.terra.api.inventory.item.ItemMeta;
|
||||
@Mixin(ItemStack.class)
|
||||
@Implements(@Interface(iface = com.dfsek.terra.api.inventory.ItemStack.class, prefix = "terra$"))
|
||||
public abstract class ItemStackMixin {
|
||||
@Shadow
|
||||
@Final
|
||||
private ComponentMapImpl components;
|
||||
|
||||
@Shadow
|
||||
public abstract int getCount();
|
||||
|
||||
@@ -53,10 +54,6 @@ public abstract class ItemStackMixin {
|
||||
@Shadow
|
||||
public abstract ComponentMap getComponents();
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private ComponentMapImpl components;
|
||||
|
||||
public int terra$getAmount() {
|
||||
return getCount();
|
||||
}
|
||||
|
||||
+4
-6
@@ -17,10 +17,7 @@
|
||||
|
||||
package com.dfsek.terra.mod.mixin.implementations.terra.inventory.meta;
|
||||
|
||||
import com.dfsek.terra.mod.CommonPlatform;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.entry.RegistryEntry;
|
||||
import net.minecraft.registry.entry.RegistryEntryList;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
@@ -32,6 +29,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.dfsek.terra.api.inventory.ItemStack;
|
||||
import com.dfsek.terra.mod.CommonPlatform;
|
||||
|
||||
import static net.minecraft.enchantment.Enchantment.canBeCombined;
|
||||
|
||||
@@ -39,13 +37,13 @@ import static net.minecraft.enchantment.Enchantment.canBeCombined;
|
||||
@Mixin(Enchantment.class)
|
||||
@Implements(@Interface(iface = com.dfsek.terra.api.inventory.item.Enchantment.class, prefix = "terra$"))
|
||||
public abstract class EnchantmentMixin {
|
||||
@Shadow
|
||||
public abstract boolean isAcceptableItem(net.minecraft.item.ItemStack stack);
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private RegistryEntryList<Enchantment> exclusiveSet;
|
||||
|
||||
@Shadow
|
||||
public abstract boolean isAcceptableItem(net.minecraft.item.ItemStack stack);
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public boolean terra$canEnchantItem(ItemStack itemStack) {
|
||||
return isAcceptableItem((net.minecraft.item.ItemStack) (Object) itemStack);
|
||||
|
||||
+2
-4
@@ -19,9 +19,6 @@ package com.dfsek.terra.mod.mixin.implementations.terra.inventory.meta;
|
||||
|
||||
import net.minecraft.component.type.ItemEnchantmentsComponent;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.entry.RegistryEntry;
|
||||
import org.spongepowered.asm.mixin.Implements;
|
||||
import org.spongepowered.asm.mixin.Interface;
|
||||
@@ -49,7 +46,8 @@ public abstract class ItemStackMetaMixin {
|
||||
@Shadow
|
||||
public abstract void addEnchantment(RegistryEntry<net.minecraft.enchantment.Enchantment> enchantment, int level);
|
||||
|
||||
public void terra$addEnchantment(Enchantment enchantment, int level) { ;
|
||||
public void terra$addEnchantment(Enchantment enchantment, int level) {
|
||||
;
|
||||
addEnchantment(RegistryEntry.of((net.minecraft.enchantment.Enchantment) (Object) enchantment), level);
|
||||
}
|
||||
|
||||
|
||||
+3
-6
@@ -17,8 +17,6 @@
|
||||
|
||||
package com.dfsek.terra.mod.mixin.implementations.terra.world;
|
||||
|
||||
import com.dfsek.terra.mod.mixin.invoke.FluidBlockInvoker;
|
||||
|
||||
import net.minecraft.block.FluidBlock;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.util.collection.BoundedRegionArray;
|
||||
@@ -27,7 +25,6 @@ import net.minecraft.world.ChunkRegion;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.ChunkGenerationStep;
|
||||
import net.minecraft.world.chunk.ChunkStatus;
|
||||
import net.minecraft.world.tick.MultiTickScheduler;
|
||||
import net.minecraft.world.tick.OrderedTick;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
@@ -40,8 +37,6 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.terra.api.block.entity.BlockEntity;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
@@ -52,6 +47,7 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||
import com.dfsek.terra.api.world.chunk.generation.ProtoWorld;
|
||||
import com.dfsek.terra.mod.generation.MinecraftChunkGeneratorWrapper;
|
||||
import com.dfsek.terra.mod.mixin.invoke.FluidBlockInvoker;
|
||||
import com.dfsek.terra.mod.util.MinecraftUtil;
|
||||
|
||||
|
||||
@@ -78,7 +74,8 @@ public abstract class ChunkRegionMixin {
|
||||
|
||||
|
||||
@Inject(at = @At("RETURN"),
|
||||
method = "<init>(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/collection/BoundedRegionArray;Lnet/minecraft/world/chunk/ChunkGenerationStep;Lnet/minecraft/world/chunk/Chunk;)V")
|
||||
method = "<init>(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/collection/BoundedRegionArray;" +
|
||||
"Lnet/minecraft/world/chunk/ChunkGenerationStep;Lnet/minecraft/world/chunk/Chunk;)V")
|
||||
public void injectConstructor(net.minecraft.server.world.ServerWorld world, BoundedRegionArray chunks,
|
||||
ChunkGenerationStep generationStep, Chunk centerPos, CallbackInfo ci) {
|
||||
this.terra$config = ((ServerWorld) world).getPack();
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@ import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
@Mixin(FluidBlock.class)
|
||||
public interface FluidBlockInvoker {
|
||||
@Invoker("getFluidState")
|
||||
public FluidState invokeGetFluidState(BlockState state);
|
||||
FluidState invokeGetFluidState(BlockState state);
|
||||
}
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ public class DataPackContentsMixin {
|
||||
@Shadow
|
||||
@Final
|
||||
private ReloadableRegistries.Lookup reloadableRegistries;
|
||||
|
||||
/*
|
||||
* #refresh populates all tags in the registries
|
||||
*/
|
||||
|
||||
@@ -45,8 +45,9 @@ public class PresetUtil {
|
||||
.orElseThrow();
|
||||
|
||||
|
||||
Identifier generatorID = Identifier.tryParse("terra:" + pack.getID().toLowerCase(Locale.ROOT) + "/" + pack.getNamespace().toLowerCase(
|
||||
Locale.ROOT));
|
||||
Identifier generatorID = Identifier.tryParse(
|
||||
"terra:" + pack.getID().toLowerCase(Locale.ROOT) + "/" + pack.getNamespace().toLowerCase(
|
||||
Locale.ROOT));
|
||||
|
||||
PRESETS.add(generatorID);
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"implementations.terra.inventory.meta.ItemStackMetaMixin",
|
||||
"implementations.terra.world.ChunkRegionMixin",
|
||||
"implementations.terra.world.ServerWorldMixin",
|
||||
"invoke.FluidBlockInvoker",
|
||||
"lifecycle.DataPackContentsMixin"
|
||||
],
|
||||
"client": [
|
||||
|
||||
@@ -15,7 +15,7 @@ dependencies {
|
||||
minecraft("com.mojang:minecraft:${Versions.Mod.minecraft}")
|
||||
mappings("net.fabricmc:yarn:${Versions.Mod.yarn}:v2")
|
||||
|
||||
modImplementation("org.incendo", "cloud-fabric", Versions.Libraries.cloudFabric) {
|
||||
modImplementation("org.incendo", "cloud-fabric", Versions.Fabric.cloud) {
|
||||
exclude("net.fabricmc")
|
||||
exclude("net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ public final class LifecycleEntryPoint {
|
||||
FabricServerCommandManager<CommandSender> manager = new FabricServerCommandManager<>(
|
||||
ExecutionCoordinator.simpleCoordinator(),
|
||||
SenderMapper.create(
|
||||
serverCommandSource -> (CommandSender) serverCommandSource,
|
||||
commandSender -> (ServerCommandSource) commandSender)
|
||||
serverCommandSource -> (CommandSender) serverCommandSource,
|
||||
commandSender -> (ServerCommandSource) commandSender)
|
||||
);
|
||||
|
||||
|
||||
|
||||
+6
@@ -16,6 +16,7 @@ import java.net.Proxy;
|
||||
|
||||
import com.dfsek.terra.lifecycle.LifecyclePlatform;
|
||||
|
||||
import static com.dfsek.terra.lifecycle.util.LifecycleUtil.initialized;
|
||||
|
||||
@Mixin(MinecraftServer.class)
|
||||
public class MinecraftServerMixin {
|
||||
@@ -29,4 +30,9 @@ public class MinecraftServerMixin {
|
||||
WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory, CallbackInfo ci) {
|
||||
LifecyclePlatform.setServer((MinecraftServer) (Object) this);
|
||||
}
|
||||
|
||||
@Inject(method = "shutdown()V", at = @At("RETURN"))
|
||||
private void injectShutdown(CallbackInfo ci) {
|
||||
initialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
+18
-33
@@ -1,15 +1,13 @@
|
||||
package com.dfsek.terra.lifecycle.mixin.lifecycle;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.registry.DynamicRegistryManager;
|
||||
import net.minecraft.registry.DynamicRegistryManager.Immutable;
|
||||
import net.minecraft.registry.MutableRegistry;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.registry.RegistryLoader;
|
||||
import net.minecraft.registry.RegistryLoader.Loader;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.MultiNoiseBiomeSourceParameterList;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraft.world.gen.WorldPreset;
|
||||
@@ -20,7 +18,6 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.List;
|
||||
@@ -31,30 +28,19 @@ import com.dfsek.terra.lifecycle.LifecyclePlatform;
|
||||
import com.dfsek.terra.lifecycle.util.LifecycleUtil;
|
||||
import com.dfsek.terra.lifecycle.util.RegistryHack;
|
||||
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import static com.dfsek.terra.lifecycle.util.LifecycleUtil.initialized;
|
||||
|
||||
|
||||
@Mixin(RegistryLoader.class)
|
||||
public class RegistryLoaderMixin {
|
||||
private static boolean initialized = false;
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private static Logger LOGGER;
|
||||
// @Inject(
|
||||
// method = "load(Lnet/minecraft/registry/RegistryLoader$RegistryLoadable;Lnet/minecraft/registry/DynamicRegistryManager;Ljava/util/List;)Lnet/minecraft/registry/DynamicRegistryManager$Immutable;",
|
||||
// at = @At(
|
||||
// value = "INVOKE",
|
||||
// target = "Ljava/util/List;forEach(Ljava/util/function/Consumer;)V",
|
||||
// ordinal = 1 // we want right after the first forEach
|
||||
// )
|
||||
// )
|
||||
// private static void grabRegiestry(RegistryLoader.RegistryLoadable loadable, DynamicRegistryManager baseRegistryManager,
|
||||
// List<RegistryLoader.Entry<?>> entries, CallbackInfoReturnable<Immutable> cir) {
|
||||
// entries.forEach((loader) -> {
|
||||
// Registry<?> registry = loader.registry();
|
||||
// }
|
||||
|
||||
@Redirect(
|
||||
method = "load(Lnet/minecraft/registry/RegistryLoader$RegistryLoadable;Lnet/minecraft/registry/DynamicRegistryManager;Ljava/util/List;)Lnet/minecraft/registry/DynamicRegistryManager$Immutable;",
|
||||
method = "load(Lnet/minecraft/registry/RegistryLoader$RegistryLoadable;Lnet/minecraft/registry/DynamicRegistryManager;" +
|
||||
"Ljava/util/List;)Lnet/minecraft/registry/DynamicRegistryManager$Immutable;",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Ljava/util/List;forEach(Ljava/util/function/Consumer;)V",
|
||||
@@ -62,20 +48,19 @@ public class RegistryLoaderMixin {
|
||||
)
|
||||
)
|
||||
private static void grabManager(List<RegistryLoader.Loader<?>> instance, Consumer<? super Loader<?>> consumer) {
|
||||
if (!initialized) {
|
||||
extractRegistry(instance, RegistryKeys.BIOME).ifPresent(
|
||||
biomes -> { // this redirect triggers twice, second time only with dimension registry. don't try extraction second time
|
||||
MutableRegistry<DimensionType> dimensionTypes = extractRegistry(instance, RegistryKeys.DIMENSION_TYPE).orElseThrow();
|
||||
MutableRegistry<WorldPreset> worldPresets = extractRegistry(instance, RegistryKeys.WORLD_PRESET).orElseThrow();
|
||||
MutableRegistry<ChunkGeneratorSettings> chunkGeneratorSettings = extractRegistry(instance,
|
||||
RegistryKeys.CHUNK_GENERATOR_SETTINGS).orElseThrow();
|
||||
MutableRegistry<MultiNoiseBiomeSourceParameterList> multiNoiseBiomeSourceParameterLists = extractRegistry(instance,
|
||||
RegistryKeys.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST).orElseThrow();
|
||||
MutableRegistry<Enchantment> enchantments = extractRegistry(instance, RegistryKeys.ENCHANTMENT).orElseThrow();
|
||||
if(!initialized) {
|
||||
MutableRegistry<Biome> biomes = extractRegistry(instance, RegistryKeys.BIOME).orElseThrow();
|
||||
MutableRegistry<DimensionType> dimensionTypes = extractRegistry(instance, RegistryKeys.DIMENSION_TYPE).orElseThrow();
|
||||
MutableRegistry<WorldPreset> worldPresets = extractRegistry(instance, RegistryKeys.WORLD_PRESET).orElseThrow();
|
||||
MutableRegistry<ChunkGeneratorSettings> chunkGeneratorSettings = extractRegistry(instance,
|
||||
RegistryKeys.CHUNK_GENERATOR_SETTINGS).orElseThrow();
|
||||
MutableRegistry<MultiNoiseBiomeSourceParameterList> multiNoiseBiomeSourceParameterLists = extractRegistry(instance,
|
||||
RegistryKeys.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST).orElseThrow();
|
||||
MutableRegistry<Enchantment> enchantments = extractRegistry(instance, RegistryKeys.ENCHANTMENT).orElseThrow();
|
||||
|
||||
LifecyclePlatform.setRegistries(biomes, dimensionTypes, chunkGeneratorSettings, multiNoiseBiomeSourceParameterLists, enchantments);
|
||||
LifecycleUtil.initialize(biomes, worldPresets);
|
||||
});
|
||||
LifecyclePlatform.setRegistries(biomes, dimensionTypes, chunkGeneratorSettings, multiNoiseBiomeSourceParameterLists,
|
||||
enchantments);
|
||||
LifecycleUtil.initialize(biomes, worldPresets);
|
||||
initialized = true;
|
||||
}
|
||||
instance.forEach(consumer);
|
||||
|
||||
+6
-2
@@ -13,10 +13,14 @@ import com.dfsek.terra.mod.util.MinecraftUtil;
|
||||
@Mixin(SaveLoading.class)
|
||||
public class SaveLoadingMixin {
|
||||
@ModifyArg(
|
||||
method = "load(Lnet/minecraft/server/SaveLoading$ServerConfig;Lnet/minecraft/server/SaveLoading$LoadContextSupplier;Lnet/minecraft/server/SaveLoading$SaveApplierFactory;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;",
|
||||
method = "load(Lnet/minecraft/server/SaveLoading$ServerConfig;Lnet/minecraft/server/SaveLoading$LoadContextSupplier;" +
|
||||
"Lnet/minecraft/server/SaveLoading$SaveApplierFactory;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)" +
|
||||
"Ljava/util/concurrent/CompletableFuture;",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/registry/RegistryLoader;loadFromResource(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/registry/DynamicRegistryManager;Ljava/util/List;)Lnet/minecraft/registry/DynamicRegistryManager$Immutable;" ),
|
||||
target = "Lnet/minecraft/registry/RegistryLoader;loadFromResource(Lnet/minecraft/resource/ResourceManager;" +
|
||||
"Lnet/minecraft/registry/DynamicRegistryManager;Ljava/util/List;)" +
|
||||
"Lnet/minecraft/registry/DynamicRegistryManager$Immutable;"),
|
||||
index = 1
|
||||
)
|
||||
private static DynamicRegistryManager grabManager(DynamicRegistryManager registryManager) {
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ import com.dfsek.terra.mod.CommonPlatform;
|
||||
|
||||
|
||||
public final class LifecycleUtil {
|
||||
public static boolean initialized = false;
|
||||
private LifecycleUtil() {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
id("dev.architectury.loom") version Versions.Mod.architecuryLoom
|
||||
id("architectury-plugin") version Versions.Mod.architecturyPlugin
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
neoForge()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
shadedApi(project(":common:implementation:base"))
|
||||
"forgeRuntimeLibrary"(project(":common:implementation:base"))
|
||||
|
||||
implementation(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
|
||||
"developmentNeoForge"(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
|
||||
shaded(project(path = ":platforms:mixin-common", configuration = "transformProductionNeoForge")) { isTransitive = false }
|
||||
|
||||
minecraft("com.mojang", "minecraft", Versions.Mod.minecraft)
|
||||
mappings(
|
||||
loom.layered {
|
||||
mappings("net.fabricmc:yarn:${Versions.Mod.yarn}:v2")
|
||||
mappings("dev.architectury:yarn-mappings-patch-neoforge:${Versions.NeoForge.yarnPatch}")
|
||||
}
|
||||
)
|
||||
|
||||
neoForge("net.neoforged", "neoforge", Versions.NeoForge.neoForge)
|
||||
|
||||
modImplementation("org.incendo", "cloud-neoforge", Versions.NeoForge.cloud)
|
||||
include("org.incendo", "cloud-neoforge", Versions.NeoForge.cloud)
|
||||
|
||||
//forge is not ok.
|
||||
compileOnly("org.burningwave:core:${Versions.NeoForge.burningwave}")
|
||||
"forgeRuntimeLibrary"("org.burningwave:core:${Versions.NeoForge.burningwave}")
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath.set(project(":platforms:mixin-common").file("src/main/resources/terra.accesswidener"))
|
||||
|
||||
// mixin {
|
||||
// defaultRefmapName.set("terra.neoforge.refmap.json")
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
addonDir(project.file("./run/config/Terra/addons"), tasks.named("configureLaunch").get())
|
||||
|
||||
tasks {
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
mapOf(
|
||||
"Implementation-Title" to rootProject.name,
|
||||
"Implementation-Version" to project.version,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
remapJar {
|
||||
dependsOn("installAddons")
|
||||
|
||||
injectAccessWidener.set(true)
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
archiveFileName.set("${rootProject.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}-neoforge-${project.version}.jar")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
loom.platform=neoforge
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.forge;
|
||||
package com.dfsek.terra.neoforge;
|
||||
|
||||
import net.minecraftforge.fml.loading.FMLLoader;
|
||||
import org.burningwave.core.classes.Classes;
|
||||
@@ -67,7 +67,7 @@ public final class AwfulForgeHacks {
|
||||
try(JarFile jar = getTerraJar()) {
|
||||
jar.stream()
|
||||
.forEach(jarEntry -> {
|
||||
if(jarEntry.getName().startsWith("com/dfsek/terra/forge/mixin")
|
||||
if(jarEntry.getName().startsWith("com/dfsek/terra/neoforge/mixin")
|
||||
|| jarEntry.getName().startsWith("com/dfsek/terra/mod/mixin")) {
|
||||
return;
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.forge;
|
||||
package com.dfsek.terra.neoforge;
|
||||
|
||||
import com.dfsek.terra.mod.MinecraftAddon;
|
||||
import com.dfsek.terra.mod.ModPlatform;
|
||||
+6
-6
@@ -15,7 +15,7 @@
|
||||
* along with Terra. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.dfsek.terra.forge;
|
||||
package com.dfsek.terra.neoforge;
|
||||
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.util.Identifier;
|
||||
@@ -34,9 +34,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.dfsek.terra.api.event.events.platform.PlatformInitializationEvent;
|
||||
import com.dfsek.terra.forge.AwfulForgeHacks.RegistrySanityCheck;
|
||||
import com.dfsek.terra.forge.AwfulForgeHacks.RegistryStep;
|
||||
import com.dfsek.terra.forge.util.BiomeUtil;
|
||||
import com.dfsek.terra.neoforge.AwfulForgeHacks.RegistrySanityCheck;
|
||||
import com.dfsek.terra.neoforge.AwfulForgeHacks.RegistryStep;
|
||||
import com.dfsek.terra.neoforge.util.BiomeUtil;
|
||||
import com.dfsek.terra.mod.data.Codecs;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ForgeEntryPoint {
|
||||
|
||||
|
||||
event.register(RegistryKeys.CHUNK_GENERATOR,
|
||||
helper -> helper.register(new Identifier("terra:terra"), Codecs.MINECRAFT_CHUNK_GENERATOR_WRAPPER));
|
||||
event.register(RegistryKeys.BIOME_SOURCE, helper -> helper.register(new Identifier("terra:terra"), Codecs.TERRA_BIOME_SOURCE));
|
||||
helper -> helper.register(Identifier.of("terra:terra"), Codecs.MINECRAFT_CHUNK_GENERATOR_WRAPPER));
|
||||
event.register(RegistryKeys.BIOME_SOURCE, helper -> helper.register(Identifier.of("terra:terra"), Codecs.TERRA_BIOME_SOURCE));
|
||||
}
|
||||
}
|
||||
+8
-2
@@ -15,12 +15,13 @@
|
||||
* along with Terra. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.dfsek.terra.forge;
|
||||
package com.dfsek.terra.neoforge;
|
||||
|
||||
import ca.solostudios.strata.Versions;
|
||||
import ca.solostudios.strata.parser.tokenizer.ParseException;
|
||||
import ca.solostudios.strata.version.Version;
|
||||
import net.minecraft.MinecraftVersion;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
@@ -68,7 +69,7 @@ public class ForgePlatform extends ModPlatform {
|
||||
MinecraftServer server = getServer();
|
||||
|
||||
if(server != null) {
|
||||
server.reloadResources(server.getDataPackManager().getNames()).exceptionally(throwable -> {
|
||||
server.reloadResources(server.getDataPackManager().getEnabledIds()).exceptionally(throwable -> {
|
||||
LOGGER.warn("Failed to execute reload", throwable);
|
||||
return null;
|
||||
}).join();
|
||||
@@ -147,4 +148,9 @@ public class ForgePlatform extends ModPlatform {
|
||||
public Registry<MultiNoiseBiomeSourceParameterList> multiNoiseBiomeSourceParameterListRegistry() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Registry<Enchantment> enchantmentRegistry() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.forge.mixin.lifecycle;
|
||||
package com.dfsek.terra.neoforge.mixin.lifecycle;
|
||||
|
||||
import net.minecraft.registry.RegistryEntryLookup;
|
||||
import net.minecraft.util.math.noise.DoublePerlinNoiseSampler.NoiseParameters;
|
||||
+1
-1
@@ -19,4 +19,4 @@
|
||||
* Mixins that inject behavior into the client/server lifecycle.
|
||||
*/
|
||||
|
||||
package com.dfsek.terra.forge.mixin.lifecycle;
|
||||
package com.dfsek.terra.neoforge.mixin.lifecycle;
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.forge.util;
|
||||
package com.dfsek.terra.neoforge.util;
|
||||
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
@@ -16,7 +16,7 @@ import java.util.Objects;
|
||||
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.world.biome.Biome;
|
||||
import com.dfsek.terra.forge.ForgeEntryPoint;
|
||||
import com.dfsek.terra.neoforge.ForgeEntryPoint;
|
||||
import com.dfsek.terra.mod.config.PreLoadCompatibilityOptions;
|
||||
import com.dfsek.terra.mod.config.ProtoPlatformBiome;
|
||||
import com.dfsek.terra.mod.config.VanillaBiomeProperties;
|
||||
@@ -66,7 +66,7 @@ public final class BiomeUtil {
|
||||
.value(),
|
||||
vanillaBiomeProperties);
|
||||
|
||||
Identifier identifier = new Identifier("terra", MinecraftUtil.createBiomeID(pack, id));
|
||||
Identifier identifier = Identifier.of("terra", MinecraftUtil.createBiomeID(pack, id));
|
||||
|
||||
if(ForgeRegistries.BIOMES.containsKey(identifier)) {
|
||||
((ProtoPlatformBiome) biome.getPlatformBiome()).setDelegate(ForgeRegistries.BIOMES.getHolder(identifier)
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.dfsek.terra.forge.mixin",
|
||||
"package": "com.dfsek.terra.neoforge.mixin",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"mixins": [
|
||||
"lifecycle.NoiseConfigMixin"
|
||||
@@ -1,65 +0,0 @@
|
||||
plugins {
|
||||
id("dev.architectury.loom") version Versions.Mod.architecuryLoom
|
||||
id("architectury-plugin") version Versions.Mod.architecturyPlugin
|
||||
id("io.github.juuxel.loom-vineflower") version Versions.Mod.loomVineflower
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
loader("quilt")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
shadedApi(project(":common:implementation:base"))
|
||||
|
||||
annotationProcessor("net.fabricmc:sponge-mixin:${Versions.Mod.mixin}")
|
||||
annotationProcessor("dev.architectury:architectury-loom:${Versions.Mod.architecuryLoom}")
|
||||
|
||||
|
||||
implementation(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
|
||||
"developmentQuilt"(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
|
||||
shaded(project(path = ":platforms:mixin-common", configuration = "transformProductionQuilt")) { isTransitive = false }
|
||||
|
||||
implementation(project(path = ":platforms:mixin-lifecycle", configuration = "namedElements")) { isTransitive = false }
|
||||
"developmentQuilt"(project(path = ":platforms:mixin-lifecycle", configuration = "namedElements")) { isTransitive = false }
|
||||
shaded(project(path = ":platforms:mixin-lifecycle", configuration = "transformProductionQuilt")) { isTransitive = false }
|
||||
|
||||
minecraft("com.mojang:minecraft:${Versions.Mod.minecraft}")
|
||||
mappings("net.fabricmc:yarn:${Versions.Mod.yarn}:v2")
|
||||
|
||||
modImplementation("org.quiltmc:quilt-loader:${Versions.Quilt.quiltLoader}")
|
||||
|
||||
modImplementation("org.quiltmc.quilted-fabric-api:quilted-fabric-api:${Versions.Quilt.fabricApi}")
|
||||
|
||||
modImplementation("cloud.commandframework", "cloud-fabric", Versions.Libraries.cloud) {
|
||||
exclude("net.fabricmc")
|
||||
exclude("net.fabricmc.fabric-api")
|
||||
}
|
||||
include("cloud.commandframework", "cloud-fabric", Versions.Libraries.cloud) {
|
||||
exclude("net.fabricmc")
|
||||
exclude("net.fabricmc.fabric-api")
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath.set(project(":platforms:mixin-common").file("src/main/resources/terra.accesswidener"))
|
||||
|
||||
mixin {
|
||||
defaultRefmapName.set("terra.quilt.refmap.json")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
addonDir(project.file("./run/config/Terra/addons"), tasks.named("configureLaunch").get())
|
||||
|
||||
tasks {
|
||||
compileJava {
|
||||
options.release.set(17)
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener.set(true)
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
archiveFileName.set("${rootProject.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() })}-quilt-${project.version}.jar")
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
loom.platform=quilt
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.dfsek.terra.quilt;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
/**
|
||||
* So you want to Mixin into Authlib/Brigadier/DataFixerUpper, on Fabric you'll need this guy.
|
||||
*
|
||||
* <p>YOU SHOULD ONLY USE THIS CLASS DURING "preLaunch" and ONLY TARGET A CLASS WHICH IS NOT ANY CLASS YOU MIXIN TO.
|
||||
* <p>
|
||||
* This will likely not work on Gson because FabricLoader has some special logic related to Gson.
|
||||
*/
|
||||
public final class AwfulQuiltHacks {
|
||||
private static final ClassLoader KNOT_CLASSLOADER = Thread.currentThread().getContextClassLoader();
|
||||
private static final Method ADD_URL_METHOD;
|
||||
static {
|
||||
Method tempAddUrlMethod = null;
|
||||
try {
|
||||
tempAddUrlMethod = KNOT_CLASSLOADER.getClass().getMethod("addURL", URL.class);
|
||||
tempAddUrlMethod.setAccessible(true);
|
||||
} catch(ReflectiveOperationException e) {
|
||||
throw new RuntimeException("Failed to load Classloader fields", e);
|
||||
}
|
||||
|
||||
ADD_URL_METHOD = tempAddUrlMethod;
|
||||
}
|
||||
|
||||
private AwfulQuiltHacks() { }
|
||||
|
||||
/**
|
||||
* Hackily load the package which a mixin may exist within.
|
||||
* <p>
|
||||
* YOU SHOULD NOT TARGET A CLASS WHICH YOU MIXIN TO.
|
||||
*
|
||||
* @param pathOfAClass The path of any class within the package.
|
||||
*/
|
||||
public static void hackilyLoadForMixin(String pathOfAClass)
|
||||
throws ClassNotFoundException, InvocationTargetException, IllegalAccessException {
|
||||
URL url = Class.forName(pathOfAClass).getProtectionDomain().getCodeSource().getLocation();
|
||||
ADD_URL_METHOD.invoke(KNOT_CLASSLOADER, url);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.dfsek.terra.quilt;
|
||||
|
||||
import com.dfsek.terra.mod.MinecraftAddon;
|
||||
import com.dfsek.terra.mod.ModPlatform;
|
||||
|
||||
|
||||
public class QuiltAddon extends MinecraftAddon {
|
||||
|
||||
public QuiltAddon(ModPlatform modPlatform) {
|
||||
super(modPlatform);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "terra-quilt";
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This file is part of Terra.
|
||||
*
|
||||
* Terra is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Terra is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Terra. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.dfsek.terra.quilt;
|
||||
|
||||
import org.quiltmc.loader.api.ModContainer;
|
||||
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
|
||||
|
||||
import com.dfsek.terra.lifecycle.LifecycleEntryPoint;
|
||||
|
||||
|
||||
public class QuiltEntryPoint extends LifecycleEntryPoint implements ModInitializer {
|
||||
private static final QuiltPlatform TERRA_PLUGIN = new QuiltPlatform();
|
||||
|
||||
@Override
|
||||
public void onInitialize(ModContainer container) {
|
||||
initialize("Quilt", TERRA_PLUGIN);
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* This file is part of Terra.
|
||||
*
|
||||
* Terra is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Terra is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Terra. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.dfsek.terra.quilt;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.quiltmc.loader.api.QuiltLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.dfsek.terra.api.addon.BaseAddon;
|
||||
import com.dfsek.terra.lifecycle.LifecyclePlatform;
|
||||
|
||||
|
||||
public class QuiltPlatform extends LifecyclePlatform {
|
||||
|
||||
@Override
|
||||
protected Collection<BaseAddon> getPlatformMods() {
|
||||
return QuiltLoader.getAllMods()
|
||||
.stream()
|
||||
.flatMap(mod -> parseModData(mod.metadata().id(), mod.metadata().version().raw(), "quilt"))
|
||||
.collect(
|
||||
Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String platformName() {
|
||||
return "Quilt";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull File getDataFolder() {
|
||||
return new File(QuiltLoader.getConfigDir().toFile(), "Terra");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseAddon getPlatformAddon() {
|
||||
return new QuiltAddon(this);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.dfsek.terra.quilt;
|
||||
|
||||
import cloud.commandframework.brigadier.BrigadierMappingBuilder;
|
||||
import org.quiltmc.loader.api.ModContainer;
|
||||
import org.quiltmc.loader.api.QuiltLoader;
|
||||
import org.quiltmc.loader.api.entrypoint.PreLaunchEntrypoint;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
|
||||
public class QuiltPreLaunchEntryPoint implements PreLaunchEntrypoint {
|
||||
@Override
|
||||
public void onPreLaunch(ModContainer mod) {
|
||||
if(QuiltLoader.isDevelopmentEnvironment()) {
|
||||
try {
|
||||
AwfulQuiltHacks.hackilyLoadForMixin(BrigadierMappingBuilder.class.getName());
|
||||
} catch(ClassNotFoundException | InvocationTargetException | IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 127 KiB |
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"generator.terra": "Terra"
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"quilt_loader": {
|
||||
"group": "com.dfsek",
|
||||
"id": "terra",
|
||||
"version": "@VERSION@",
|
||||
"metadata": {
|
||||
"name": "Terra",
|
||||
"description": "@DESCRIPTION@",
|
||||
"authors": [
|
||||
"dfsek"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "@WIKI@",
|
||||
"sources": "@SOURCE@",
|
||||
"issues": "@ISSUES@"
|
||||
},
|
||||
"license": "@LICENSE@",
|
||||
"icon": "assets/terra/icon.png"
|
||||
},
|
||||
"environment": "*",
|
||||
"intermediate_mappings": "net.fabricmc:intermediary",
|
||||
"entrypoints": {
|
||||
"init": [
|
||||
"com.dfsek.terra.quilt.QuiltEntryPoint"
|
||||
],
|
||||
"pre_launch": [
|
||||
"com.dfsek.terra.quilt.QuiltPreLaunchEntryPoint"
|
||||
]
|
||||
},
|
||||
"depends": [
|
||||
{
|
||||
"id": "quilt_loader",
|
||||
"version": ">=0.17.0"
|
||||
},
|
||||
{
|
||||
"id": "java",
|
||||
"version": ">=17"
|
||||
},
|
||||
{
|
||||
"id": "minecraft",
|
||||
"version": "1.20.x"
|
||||
},
|
||||
{
|
||||
"id": "quilted_fabric_api",
|
||||
"versions": ">=2.0.0-"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mixin": [
|
||||
"terra.quilt.mixins.json",
|
||||
"terra.lifecycle.mixins.json",
|
||||
"terra.common.mixins.json"
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.dfsek.terra.quilt.mixin",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
"server": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user