gradle 7 (temporarily remove Forge module)

This commit is contained in:
dfsek 2021-05-28 15:10:30 -07:00
parent cba3388cb1
commit 16fcf09c78
8 changed files with 15 additions and 15 deletions

View File

@ -14,8 +14,8 @@ fun Project.configureCompilation() {
apply(plugin = "idea") apply(plugin = "idea")
configure<JavaPluginConvention> { configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_16
} }
tasks.withType<JavaCompile> { tasks.withType<JavaCompile> {

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
org.gradle.jvmargs=-Xmx4096m org.gradle.jvmargs=-Xmx4096m

View File

@ -7,7 +7,7 @@ import net.fabricmc.loom.task.RemapJarTask
plugins { plugins {
`java-library` `java-library`
`maven-publish` `maven-publish`
id("fabric-loom").version("0.6-SNAPSHOT") id("fabric-loom").version("0.8-SNAPSHOT")
id("com.modrinth.minotaur").version("1.1.0") id("com.modrinth.minotaur").version("1.1.0")
} }
@ -23,8 +23,8 @@ group = "com.dfsek.terra.fabric"
dependencies { dependencies {
"shadedApi"(project(":common")) "shadedApi"(project(":common"))
"minecraft"("com.mojang:minecraft:21w11a") "minecraft"("com.mojang:minecraft:1.17-pre1")
"mappings"("net.fabricmc:yarn:21w11a+build.3:v2") "mappings"("net.fabricmc:yarn:1.17-pre1+build.4:v2")
"modImplementation"("net.fabricmc:fabric-loader:0.11.3") "modImplementation"("net.fabricmc:fabric-loader:0.11.3")
"modCompileOnly"("com.sk89q.worldedit:worldedit-fabric-mc1.16:7.2.0-SNAPSHOT") { "modCompileOnly"("com.sk89q.worldedit:worldedit-fabric-mc1.16:7.2.0-SNAPSHOT") {

View File

@ -264,7 +264,7 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
Registry.register(Registry.FEATURE, new Identifier("terra", "populator"), POPULATOR_FEATURE); 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(BuiltinRegistries.CONFIGURED_FEATURE, floraKey.getValue(), POPULATOR_CONFIGURED_FEATURE);
Registry.register(Registry.CHUNK_GENERATOR, new Identifier("terra:terra"), FabricChunkGeneratorWrapper.CODEC); Registry.register(Registry.CHUNK_GENERATOR, new Identifier("terra:terra"), FabricChunkGeneratorWrapper.CODEC);

View File

@ -48,7 +48,7 @@ public abstract class GeneratorOptionsMixin {
boolean generateStructures = generate_structures == null || Boolean.parseBoolean(generate_structures); boolean generateStructures = generate_structures == null || Boolean.parseBoolean(generate_structures);
Registry<DimensionType> dimensionTypes = dynamicRegistryManager.get(Registry.DIMENSION_TYPE_KEY); Registry<DimensionType> dimensionTypes = dynamicRegistryManager.get(Registry.DIMENSION_TYPE_KEY);
Registry<Biome> biomes = dynamicRegistryManager.get(Registry.BIOME_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); SimpleRegistry<DimensionOptions> dimensionOptions = DimensionType.createDefaultDimensionOptions(dimensionTypes, biomes, chunkGeneratorSettings, l);
prop = prop.substring(prop.indexOf(":") + 1); prop = prop.substring(prop.indexOf(":") + 1);
@ -57,7 +57,7 @@ public abstract class GeneratorOptionsMixin {
if(pack == null) throw new IllegalArgumentException("No such pack " + prop); 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))));
} }
} }
} }

View File

@ -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;
import com.dfsek.terra.api.platform.inventory.item.ItemMeta; import com.dfsek.terra.api.platform.inventory.item.ItemMeta;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtCompound;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Implements; import org.spongepowered.asm.mixin.Implements;
import org.spongepowered.asm.mixin.Interface; import org.spongepowered.asm.mixin.Interface;
@ -27,7 +27,7 @@ public abstract class ItemStackMixin {
public abstract boolean isDamageable(); public abstract boolean isDamageable();
@Shadow @Shadow
public abstract void setTag(@Nullable CompoundTag tag); public abstract void setTag(@Nullable NbtCompound tag);
public int terra$getAmount() { public int terra$getAmount() {
return getCount(); return getCount();

View File

@ -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.Enchantment;
import com.dfsek.terra.api.platform.inventory.item.ItemMeta; import com.dfsek.terra.api.platform.inventory.item.ItemMeta;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.ListTag; import net.minecraft.nbt.NbtList;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import org.spongepowered.asm.mixin.Implements; import org.spongepowered.asm.mixin.Implements;
import org.spongepowered.asm.mixin.Interface; import org.spongepowered.asm.mixin.Interface;
@ -23,7 +23,7 @@ public abstract class ItemStackMetaMixin {
public abstract boolean hasEnchantments(); public abstract boolean hasEnchantments();
@Shadow @Shadow
public abstract ListTag getEnchantments(); public abstract NbtList getEnchantments();
@Shadow @Shadow
public abstract void addEnchantment(net.minecraft.enchantment.Enchantment enchantment, int level); 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<>(); Map<Enchantment, Integer> map = new HashMap<>();
getEnchantments().forEach(enchantment -> { getEnchantments().forEach(enchantment -> {
CompoundTag eTag = (CompoundTag) enchantment; NbtCompound eTag = (NbtCompound) enchantment;
map.put((Enchantment) Registry.ENCHANTMENT.get(eTag.getInt("id")), eTag.getInt("lvl")); map.put((Enchantment) Registry.ENCHANTMENT.get(eTag.getInt("id")), eTag.getInt("lvl"));
}); });
return map; return map;