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
@@ -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;