mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-01 15:37:24 +00:00
gradle 7 (temporarily remove Forge module)
This commit is contained in:
parent
cba3388cb1
commit
16fcf09c78
@ -14,8 +14,8 @@ fun Project.configureCompilation() {
|
||||
apply(plugin = "idea")
|
||||
|
||||
configure<JavaPluginConvention> {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
org.gradle.jvmargs=-Xmx4096m
|
@ -7,7 +7,7 @@ import net.fabricmc.loom.task.RemapJarTask
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("fabric-loom").version("0.6-SNAPSHOT")
|
||||
id("fabric-loom").version("0.8-SNAPSHOT")
|
||||
id("com.modrinth.minotaur").version("1.1.0")
|
||||
}
|
||||
|
||||
@ -23,8 +23,8 @@ group = "com.dfsek.terra.fabric"
|
||||
dependencies {
|
||||
"shadedApi"(project(":common"))
|
||||
|
||||
"minecraft"("com.mojang:minecraft:21w11a")
|
||||
"mappings"("net.fabricmc:yarn:21w11a+build.3:v2")
|
||||
"minecraft"("com.mojang:minecraft:1.17-pre1")
|
||||
"mappings"("net.fabricmc:yarn:1.17-pre1+build.4:v2")
|
||||
"modImplementation"("net.fabricmc:fabric-loader:0.11.3")
|
||||
|
||||
"modCompileOnly"("com.sk89q.worldedit:worldedit-fabric-mc1.16:7.2.0-SNAPSHOT") {
|
||||
|
@ -264,7 +264,7 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
|
||||
|
||||
|
||||
Registry.register(Registry.FEATURE, new Identifier("terra", "populator"), POPULATOR_FEATURE);
|
||||
RegistryKey<ConfiguredFeature<?, ?>> floraKey = RegistryKey.of(Registry.CONFIGURED_FEATURE_WORLDGEN, new Identifier("terra", "populator"));
|
||||
RegistryKey<ConfiguredFeature<?, ?>> floraKey = RegistryKey.of(Registry.CONFIGURED_FEATURE_KEY, new Identifier("terra", "populator"));
|
||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, floraKey.getValue(), POPULATOR_CONFIGURED_FEATURE);
|
||||
|
||||
Registry.register(Registry.CHUNK_GENERATOR, new Identifier("terra:terra"), FabricChunkGeneratorWrapper.CODEC);
|
||||
|
@ -48,7 +48,7 @@ public abstract class GeneratorOptionsMixin {
|
||||
boolean generateStructures = generate_structures == null || Boolean.parseBoolean(generate_structures);
|
||||
Registry<DimensionType> dimensionTypes = dynamicRegistryManager.get(Registry.DIMENSION_TYPE_KEY);
|
||||
Registry<Biome> biomes = dynamicRegistryManager.get(Registry.BIOME_KEY);
|
||||
Registry<ChunkGeneratorSettings> chunkGeneratorSettings = dynamicRegistryManager.get(Registry.NOISE_SETTINGS_WORLDGEN);
|
||||
Registry<ChunkGeneratorSettings> chunkGeneratorSettings = dynamicRegistryManager.get(Registry.CHUNK_GENERATOR_SETTINGS_KEY);
|
||||
SimpleRegistry<DimensionOptions> dimensionOptions = DimensionType.createDefaultDimensionOptions(dimensionTypes, biomes, chunkGeneratorSettings, l);
|
||||
|
||||
prop = prop.substring(prop.indexOf(":") + 1);
|
||||
@ -57,7 +57,7 @@ public abstract class GeneratorOptionsMixin {
|
||||
|
||||
if(pack == null) throw new IllegalArgumentException("No such pack " + prop);
|
||||
|
||||
cir.setReturnValue(new GeneratorOptions(l, generateStructures, false, GeneratorOptions.method_28608(dimensionTypes, dimensionOptions, new FabricChunkGeneratorWrapper(new TerraBiomeSource(biomes, l, pack), l, pack))));
|
||||
cir.setReturnValue(new GeneratorOptions(l, generateStructures, false, GeneratorOptions.getRegistryWithReplacedOverworldGenerator(dimensionTypes, dimensionOptions, new FabricChunkGeneratorWrapper(new TerraBiomeSource(biomes, l, pack), l, pack))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package com.dfsek.terra.fabric.mixin.implementations.inventory.item;
|
||||
import com.dfsek.terra.api.platform.inventory.Item;
|
||||
import com.dfsek.terra.api.platform.inventory.item.ItemMeta;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Implements;
|
||||
import org.spongepowered.asm.mixin.Interface;
|
||||
@ -27,7 +27,7 @@ public abstract class ItemStackMixin {
|
||||
public abstract boolean isDamageable();
|
||||
|
||||
@Shadow
|
||||
public abstract void setTag(@Nullable CompoundTag tag);
|
||||
public abstract void setTag(@Nullable NbtCompound tag);
|
||||
|
||||
public int terra$getAmount() {
|
||||
return getCount();
|
||||
|
@ -3,8 +3,8 @@ package com.dfsek.terra.fabric.mixin.implementations.inventory.meta;
|
||||
import com.dfsek.terra.api.platform.inventory.item.Enchantment;
|
||||
import com.dfsek.terra.api.platform.inventory.item.ItemMeta;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import org.spongepowered.asm.mixin.Implements;
|
||||
import org.spongepowered.asm.mixin.Interface;
|
||||
@ -23,7 +23,7 @@ public abstract class ItemStackMetaMixin {
|
||||
public abstract boolean hasEnchantments();
|
||||
|
||||
@Shadow
|
||||
public abstract ListTag getEnchantments();
|
||||
public abstract NbtList getEnchantments();
|
||||
|
||||
@Shadow
|
||||
public abstract void addEnchantment(net.minecraft.enchantment.Enchantment enchantment, int level);
|
||||
@ -39,7 +39,7 @@ public abstract class ItemStackMetaMixin {
|
||||
Map<Enchantment, Integer> map = new HashMap<>();
|
||||
|
||||
getEnchantments().forEach(enchantment -> {
|
||||
CompoundTag eTag = (CompoundTag) enchantment;
|
||||
NbtCompound eTag = (NbtCompound) enchantment;
|
||||
map.put((Enchantment) Registry.ENCHANTMENT.get(eTag.getInt("id")), eTag.getInt("lvl"));
|
||||
});
|
||||
return map;
|
||||
|
Loading…
x
Reference in New Issue
Block a user