diff --git a/CHANGELOG.md b/CHANGELOG.md index ec1f544..ea18ef0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ -### 4.2.2 +### 5.0.0 -- Add Place Feature blacklist tag -- Changed the nether portal recipe to diamond pick instead of nettherite +- Updated to 1.20.5 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 70b96f3..cde78f9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,14 @@ plugins { - id("dev.nanite.mlp") version("0.1.2") + id("dev.nanite.mlp") version("0.1.8") id("java-library") id("maven-publish") id("me.modmuss50.mod-publish-plugin") version "0.3.0" +// id 'org.jetbrains.gradle.plugin.idea-ext' version '1.0' + } -java.toolchain.languageVersion = JavaLanguageVersion.of(17) +java.toolchain.languageVersion = JavaLanguageVersion.of(21) multiLoader.root() { minecraftVersion.set(project.property("minecraft_version")) @@ -25,9 +27,16 @@ allprojects { setArchivesBaseName("${mod_name}-${project.name}".toLowerCase()) group = "com.unrealdinnerbone" - +// +// idea { +// module { +// downloadSources = true +// downloadJavadoc = true +// } +// } } + subprojects { @@ -38,7 +47,7 @@ subprojects { sourceSets.main.resources.srcDir project.file('src/generated/resources') - java.toolchain.languageVersion = JavaLanguageVersion.of(17) + java.toolchain.languageVersion = JavaLanguageVersion.of(21) base { diff --git a/common/src/generated/resources/data/jamd/advancements/enter_mining_dimension.json b/common/src/generated/resources/data/jamd/advancements/enter_mining_dimension.json index f8eb087..aef1a18 100644 --- a/common/src/generated/resources/data/jamd/advancements/enter_mining_dimension.json +++ b/common/src/generated/resources/data/jamd/advancements/enter_mining_dimension.json @@ -1,4 +1,5 @@ { + "parent": "minecraft:story/mine_diamond", "criteria": { "enter_dimension": { "conditions": { @@ -13,7 +14,8 @@ }, "hidden": true, "icon": { - "item": "jamd:portal_block" + "count": 1, + "id": "jamd:portal_block" }, "title": { "translate": "advancements.jamd.mining.title" diff --git a/common/src/generated/resources/data/jamd/advancements/recipes/transportation/end_portal_block.json b/common/src/generated/resources/data/jamd/advancements/recipes/transportation/end_portal_block.json index 413360a..f71e375 100644 --- a/common/src/generated/resources/data/jamd/advancements/recipes/transportation/end_portal_block.json +++ b/common/src/generated/resources/data/jamd/advancements/recipes/transportation/end_portal_block.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:diamond_pickaxe" - ] + "items": "minecraft:diamond_pickaxe" } ] }, diff --git a/common/src/generated/resources/data/jamd/advancements/recipes/transportation/nether_portal_block.json b/common/src/generated/resources/data/jamd/advancements/recipes/transportation/nether_portal_block.json index 5b973c7..6b8ad13 100644 --- a/common/src/generated/resources/data/jamd/advancements/recipes/transportation/nether_portal_block.json +++ b/common/src/generated/resources/data/jamd/advancements/recipes/transportation/nether_portal_block.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:diamond_pickaxe" - ] + "items": "minecraft:diamond_pickaxe" } ] }, diff --git a/common/src/generated/resources/data/jamd/advancements/recipes/transportation/portal_block.json b/common/src/generated/resources/data/jamd/advancements/recipes/transportation/portal_block.json index 66a95c0..0fbe3ed 100644 --- a/common/src/generated/resources/data/jamd/advancements/recipes/transportation/portal_block.json +++ b/common/src/generated/resources/data/jamd/advancements/recipes/transportation/portal_block.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:diamond_pickaxe" - ] + "items": "minecraft:diamond_pickaxe" } ] }, diff --git a/common/src/generated/resources/data/jamd/dimension_type/end.json b/common/src/generated/resources/data/jamd/dimension_type/end.json index f3b5b0a..28bb31f 100644 --- a/common/src/generated/resources/data/jamd/dimension_type/end.json +++ b/common/src/generated/resources/data/jamd/dimension_type/end.json @@ -14,10 +14,8 @@ "monster_spawn_block_light_limit": 0, "monster_spawn_light_level": { "type": "minecraft:uniform", - "value": { - "max_inclusive": 7, - "min_inclusive": 0 - } + "max_inclusive": 7, + "min_inclusive": 0 }, "natural": false, "piglin_safe": false, diff --git a/common/src/generated/resources/data/jamd/dimension_type/mining.json b/common/src/generated/resources/data/jamd/dimension_type/mining.json index a8449dc..5d542af 100644 --- a/common/src/generated/resources/data/jamd/dimension_type/mining.json +++ b/common/src/generated/resources/data/jamd/dimension_type/mining.json @@ -14,10 +14,8 @@ "monster_spawn_block_light_limit": 0, "monster_spawn_light_level": { "type": "minecraft:uniform", - "value": { - "max_inclusive": 7, - "min_inclusive": 0 - } + "max_inclusive": 7, + "min_inclusive": 0 }, "natural": true, "piglin_safe": false, diff --git a/common/src/generated/resources/data/jamd/dimension_type/nether.json b/common/src/generated/resources/data/jamd/dimension_type/nether.json index cacbd5d..290beb6 100644 --- a/common/src/generated/resources/data/jamd/dimension_type/nether.json +++ b/common/src/generated/resources/data/jamd/dimension_type/nether.json @@ -14,10 +14,8 @@ "monster_spawn_block_light_limit": 0, "monster_spawn_light_level": { "type": "minecraft:uniform", - "value": { - "max_inclusive": 7, - "min_inclusive": 0 - } + "max_inclusive": 7, + "min_inclusive": 0 }, "natural": false, "piglin_safe": false, diff --git a/common/src/generated/resources/data/jamd/recipes/end_portal_block.json b/common/src/generated/resources/data/jamd/recipes/end_portal_block.json index 19415c1..a2fbe83 100644 --- a/common/src/generated/resources/data/jamd/recipes/end_portal_block.json +++ b/common/src/generated/resources/data/jamd/recipes/end_portal_block.json @@ -15,6 +15,7 @@ "OOO" ], "result": { - "item": "jamd:end_portal" + "count": 1, + "id": "jamd:end_portal" } } \ No newline at end of file diff --git a/common/src/generated/resources/data/jamd/recipes/nether_portal_block.json b/common/src/generated/resources/data/jamd/recipes/nether_portal_block.json index 8e422d9..59ff0e9 100644 --- a/common/src/generated/resources/data/jamd/recipes/nether_portal_block.json +++ b/common/src/generated/resources/data/jamd/recipes/nether_portal_block.json @@ -15,6 +15,7 @@ "OOO" ], "result": { - "item": "jamd:nether_portal" + "count": 1, + "id": "jamd:nether_portal" } } \ No newline at end of file diff --git a/common/src/generated/resources/data/jamd/recipes/portal_block.json b/common/src/generated/resources/data/jamd/recipes/portal_block.json index 5e5d826..31cb5c0 100644 --- a/common/src/generated/resources/data/jamd/recipes/portal_block.json +++ b/common/src/generated/resources/data/jamd/recipes/portal_block.json @@ -15,6 +15,7 @@ "OOO" ], "result": { - "item": "jamd:portal_block" + "count": 1, + "id": "jamd:portal_block" } } \ No newline at end of file diff --git a/common/src/generated/resources/data/jamd/tags/worldgen/configured_feature/mining.json b/common/src/generated/resources/data/jamd/tags/worldgen/configured_feature/mining.json index 38d47bb..7e7c9f3 100644 --- a/common/src/generated/resources/data/jamd/tags/worldgen/configured_feature/mining.json +++ b/common/src/generated/resources/data/jamd/tags/worldgen/configured_feature/mining.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "minecraft:ore_infested" ] diff --git a/common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 1293648..5972650 100644 --- a/common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "jamd:portal_block", "jamd:nether_portal", diff --git a/common/src/generated/resources/data/minecraft/tags/blocks/needs_diamond_tool.json b/common/src/generated/resources/data/minecraft/tags/blocks/needs_diamond_tool.json deleted file mode 100644 index 1293648..0000000 --- a/common/src/generated/resources/data/minecraft/tags/blocks/needs_diamond_tool.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "replace": false, - "values": [ - "jamd:portal_block", - "jamd:nether_portal", - "jamd:end_portal" - ] -} \ No newline at end of file diff --git a/common/src/main/java/com/unrealdinnerbone/jamd/JAMDRegistry.java b/common/src/main/java/com/unrealdinnerbone/jamd/JAMDRegistry.java index c8fe435..7772899 100644 --- a/common/src/main/java/com/unrealdinnerbone/jamd/JAMDRegistry.java +++ b/common/src/main/java/com/unrealdinnerbone/jamd/JAMDRegistry.java @@ -2,6 +2,7 @@ import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import com.unrealdinnerbone.jamd.block.*; import com.unrealdinnerbone.jamd.block.base.PortalTileEntity; import com.unrealdinnerbone.jamd.world.CustomFlatLevelSource; @@ -34,9 +35,9 @@ public class JAMDRegistry implements IRegistry { private static final RegistryObjects BLOCKS = Regeneration.create(Registries.BLOCK); private static final RegistryObjects ITEMS = Regeneration.create(Registries.ITEM); private static final RegistryObjects> TILES = Regeneration.create(Registries.BLOCK_ENTITY_TYPE); - private static final RegistryObjects> CHUNK_GENERATORS = Regeneration.create(Registries.CHUNK_GENERATOR); + private static final RegistryObjects> CHUNK_GENERATORS = Regeneration.create(Registries.CHUNK_GENERATOR); - public static final RegistryEntry> CUSTOM_FLAT_LEVEL_SOURCE = CHUNK_GENERATORS.register("mining", () -> CustomFlatLevelSource.CODEC); + public static final RegistryEntry> CUSTOM_FLAT_LEVEL_SOURCE = CHUNK_GENERATORS.register("mining", () -> CustomFlatLevelSource.CODEC); public static final WorldType OVERWORLD = of("mining", "portal_block", "portal", OverworldPortalBlock::new, OverworldBlockEntity::new, BiomeTags.IS_OVERWORLD); diff --git a/common/src/main/java/com/unrealdinnerbone/jamd/block/base/PortalBlock.java b/common/src/main/java/com/unrealdinnerbone/jamd/block/base/PortalBlock.java index d9349e7..388fcfa 100644 --- a/common/src/main/java/com/unrealdinnerbone/jamd/block/base/PortalBlock.java +++ b/common/src/main/java/com/unrealdinnerbone/jamd/block/base/PortalBlock.java @@ -27,7 +27,7 @@ public abstract class PortalBlock extends Block implements EntityBlock { private final WorldType type; public PortalBlock(WorldType type) { - super(Properties.of().requiresCorrectToolForDrops().strength(5.0F, 6.0F).sound(SoundType.STONE).mapColor(MapColor.COLOR_BLUE)); + super(Properties.of().strength(5.0F, 6.0F).sound(SoundType.STONE).mapColor(MapColor.COLOR_BLUE)); this.type = type; } @@ -37,9 +37,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return type.getBlockEntity().get().create(pos, state); } - @Override - public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hand) { if (!level.isClientSide()) { if (level.dimension().equals(type.getKey().level())) { TelerportUtils.teleport(player, OVERWORLD, pos, type); diff --git a/common/src/main/java/com/unrealdinnerbone/jamd/world/CustomFlatLevelSource.java b/common/src/main/java/com/unrealdinnerbone/jamd/world/CustomFlatLevelSource.java index 8e92b47..77bbc9d 100644 --- a/common/src/main/java/com/unrealdinnerbone/jamd/world/CustomFlatLevelSource.java +++ b/common/src/main/java/com/unrealdinnerbone/jamd/world/CustomFlatLevelSource.java @@ -1,6 +1,7 @@ package com.unrealdinnerbone.jamd.world; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.world.level.chunk.ChunkGenerator; import net.minecraft.world.level.levelgen.FlatLevelSource; @@ -10,7 +11,7 @@ public class CustomFlatLevelSource extends FlatLevelSource { private final CustomFlatLevelGeneratorSettings mySettings; - public static final Codec CODEC = RecordCodecBuilder.create((instance) -> + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec((instance) -> instance.group(CustomFlatLevelGeneratorSettings.CODEC .fieldOf("settings") .forGetter(CustomFlatLevelSource::settings)) @@ -28,7 +29,7 @@ public CustomFlatLevelGeneratorSettings settings() { } @Override - protected Codec codec() { + protected MapCodec codec() { return CODEC; } diff --git a/common/src/main/resources/jamd.accesswidener b/common/src/main/resources/jamd.accesswidener index 7785392..9fbbfb0 100644 --- a/common/src/main/resources/jamd.accesswidener +++ b/common/src/main/resources/jamd.accesswidener @@ -4,4 +4,5 @@ accessible method net/minecraft/world/level/levelgen/feature/configurations/OreC accessible field net/minecraft/world/level/levelgen/placement/HeightRangePlacement height Lnet/minecraft/world/level/levelgen/heightproviders/HeightProvider; accessible field net/minecraft/world/level/levelgen/placement/CountPlacement count Lnet/minecraft/util/valueproviders/IntProvider; accessible field net/minecraft/world/level/levelgen/heightproviders/ConstantHeight value Lnet/minecraft/world/level/levelgen/VerticalAnchor; -accessible field net/minecraft/world/level/biome/BiomeGenerationSettings featureSet Ljava/util/function/Supplier; \ No newline at end of file +accessible field net/minecraft/world/level/biome/BiomeGenerationSettings featureSet Ljava/util/function/Supplier; +accessible method net/minecraft/data/worldgen/biome/OverworldBiomes calculateSkyColor (F)I \ No newline at end of file diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/AdvancementProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/AdvancementProvider.java index f461753..96cb9a4 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/AdvancementProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/AdvancementProvider.java @@ -8,20 +8,24 @@ import net.minecraft.advancements.AdvancementHolder; import net.minecraft.advancements.AdvancementType; import net.minecraft.advancements.critereon.ChangeDimensionTrigger; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.advancements.packs.VanillaStoryAdvancements; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class AdvancementProvider extends FabricAdvancementProvider { - protected AdvancementProvider(FabricDataOutput output) { - super(output); + protected AdvancementProvider(FabricDataOutput output, CompletableFuture registryLookup) { + super(output, registryLookup); } @Override - public void generateAdvancement(Consumer consumer) { + public void generateAdvancement(HolderLookup.Provider lookup, Consumer consumer) { consumer.accept(Advancement.Builder.advancement() + .parent(new ResourceLocation("minecraft", "story/mine_diamond")) .display( JAMDRegistry.OVERWORLD.getItem().get(), Component.translatable(JAMDRegistry.OVERWORLD.getAdvancementTitleKey()), diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/BlockTagProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/BlockTagProvider.java index f13a53e..062a38b 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/BlockTagProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/BlockTagProvider.java @@ -21,10 +21,5 @@ protected void addTags(HolderLookup.Provider arg) { .add(JAMDRegistry.OVERWORLD.getBlock().get()) .add(JAMDRegistry.NETHER.getBlock().get()) .add(JAMDRegistry.END.getBlock().get()); - getOrCreateTagBuilder(BlockTags.NEEDS_DIAMOND_TOOL) - .add(JAMDRegistry.OVERWORLD.getBlock().get()) - .add(JAMDRegistry.NETHER.getBlock().get()) - .add(JAMDRegistry.END.getBlock().get()); - } } diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/DRP.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/DRP.java index f9e57f8..8cf610f 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/DRP.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/DRP.java @@ -4,11 +4,12 @@ import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider; import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.Registries; +import org.jetbrains.annotations.NotNull; import java.util.concurrent.CompletableFuture; -@SuppressWarnings("UnstableApiUsage") public class DRP extends FabricDynamicRegistryProvider { + public DRP(FabricDataOutput output, CompletableFuture registriesFuture) { super(output, registriesFuture); } @@ -20,6 +21,7 @@ protected void configure(HolderLookup.Provider registries, Entries entries) { } @Override + @NotNull public String getName() { return "JAMD World Data"; } diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/FeatureTagProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/FeatureTagProvider.java index 21f05d1..05848b3 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/FeatureTagProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/FeatureTagProvider.java @@ -15,6 +15,7 @@ import java.util.concurrent.CompletableFuture; public class FeatureTagProvider extends FabricTagProvider> { + public FeatureTagProvider(FabricDataOutput output, CompletableFuture registriesFuture) { super(output, Registries.CONFIGURED_FEATURE, registriesFuture); } diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/JAMDData.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/JAMDData.java index adaceb9..b604dbd 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/JAMDData.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/JAMDData.java @@ -7,7 +7,7 @@ import net.minecraft.core.RegistrySetBuilder; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BiomeDefaultFeatures; -import net.minecraft.data.worldgen.BootstapContext; +import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.data.worldgen.biome.OverworldBiomes; import net.minecraft.data.worldgen.placement.OrePlacements; import net.minecraft.sounds.Musics; @@ -45,20 +45,20 @@ public void buildRegistry(RegistrySetBuilder registryBuilder) { registryBuilder.add(Registries.BIOME, this::bootstrapBiomes); } - private void bootstrapBiomes(BootstapContext context) { + private void bootstrapBiomes(BootstrapContext context) { Overworld.bootstrapBiome(context); Nether.bootstrapBiome(context); End.bootstrapBiome(context); } - private void bootstrapDimensionTypes(BootstapContext context) { + private void bootstrapDimensionTypes(BootstrapContext context) { Overworld.bootstrapDimensionType(context); Nether.bootstrapDimensionType(context); End.bootstrapDimensionType(context); } public static class End { - static void bootstrapBiome(BootstapContext context) { + static void bootstrapBiome(BootstrapContext context) { HolderGetter placedFeatures = context.lookup(Registries.PLACED_FEATURE); HolderGetter> configuredWorldCarvers = context.lookup(Registries.CONFIGURED_CARVER); BiomeGenerationSettings.Builder builder = new BiomeGenerationSettings.Builder(placedFeatures, configuredWorldCarvers); @@ -78,7 +78,7 @@ static void bootstrapBiome(BootstapContext context) { .build()); } - static void bootstrapDimensionType(BootstapContext context) { + static void bootstrapDimensionType(BootstrapContext context) { context.register(JAMDRegistry.END.getKey().dimensionType(), new DimensionType(OptionalLong.of(6000), false, false, @@ -100,7 +100,7 @@ static void bootstrapDimensionType(BootstapContext context) { } public static class Overworld { - static void bootstrapBiome(BootstapContext context) { + static void bootstrapBiome(BootstrapContext context) { HolderGetter placedFeatures = context.lookup(Registries.PLACED_FEATURE); HolderGetter> configuredWorldCarvers = context.lookup(Registries.CONFIGURED_CARVER); BiomeGenerationSettings.Builder builder = new BiomeGenerationSettings.Builder(placedFeatures, configuredWorldCarvers); @@ -124,7 +124,7 @@ static void bootstrapBiome(BootstapContext context) { .build()); } - static void bootstrapDimensionType(BootstapContext context) { + static void bootstrapDimensionType(BootstrapContext context) { context.register(JAMDRegistry.OVERWORLD.getKey().dimensionType(), new DimensionType(OptionalLong.of(6000), true, false, @@ -146,7 +146,7 @@ static void bootstrapDimensionType(BootstapContext context) { } public static class Nether { - static void bootstrapBiome(BootstapContext context) { + static void bootstrapBiome(BootstrapContext context) { HolderGetter placedFeatures = context.lookup(Registries.PLACED_FEATURE); HolderGetter> configuredWorldCarvers = context.lookup(Registries.CONFIGURED_CARVER); BiomeGenerationSettings.Builder builder = new BiomeGenerationSettings.Builder(placedFeatures, configuredWorldCarvers); @@ -169,7 +169,7 @@ static void bootstrapBiome(BootstapContext context) { .build()); } - static void bootstrapDimensionType(BootstapContext context) { + static void bootstrapDimensionType(BootstrapContext context) { context.register(JAMDRegistry.NETHER.getKey().dimensionType(), new DimensionType(OptionalLong.of(18000), false, false, diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LangProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LangProvider.java index a6c38c7..36cc90d 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LangProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LangProvider.java @@ -3,15 +3,18 @@ import com.unrealdinnerbone.jamd.JAMDRegistry; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider; +import net.minecraft.core.HolderLookup; + +import java.util.concurrent.CompletableFuture; public class LangProvider extends FabricLanguageProvider { - protected LangProvider(FabricDataOutput dataOutput) { - super(dataOutput); + protected LangProvider(FabricDataOutput dataOutput, CompletableFuture registryLookup) { + super(dataOutput, registryLookup); } @Override - public void generateTranslations(TranslationBuilder translationBuilder) { + public void generateTranslations(HolderLookup.Provider registryLookup, TranslationBuilder translationBuilder) { translationBuilder.add(JAMDRegistry.OVERWORLD.getBlock().get(), "Mining Portal"); translationBuilder.add(JAMDRegistry.NETHER.getBlock().get(), "Nether Mining Portal"); translationBuilder.add(JAMDRegistry.END.getBlock().get(), "End Mining Portal"); diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LootTableProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LootTableProvider.java index 3a98ec0..fab34a2 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LootTableProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/LootTableProvider.java @@ -3,11 +3,14 @@ import com.unrealdinnerbone.jamd.JAMDRegistry; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; +import net.minecraft.core.HolderLookup; + +import java.util.concurrent.CompletableFuture; public class LootTableProvider extends FabricBlockLootTableProvider { - protected LootTableProvider(FabricDataOutput dataOutput) { - super(dataOutput); + protected LootTableProvider(FabricDataOutput dataOutput, CompletableFuture registryLookup) { + super(dataOutput, registryLookup); } @Override diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/PlaceTagProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/PlaceTagProvider.java index bd6d6ee..e0fb3c9 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/PlaceTagProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/PlaceTagProvider.java @@ -13,6 +13,7 @@ import java.util.concurrent.CompletableFuture; public class PlaceTagProvider extends FabricTagProvider { + public PlaceTagProvider(FabricDataOutput output, CompletableFuture registriesFuture) { super(output, Registries.PLACED_FEATURE, registriesFuture); } diff --git a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/RecipeProvider.java b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/RecipeProvider.java index f744fe6..5081bb7 100644 --- a/fabric/src/main/java/com/unrealdinnerbone/jamd/data/RecipeProvider.java +++ b/fabric/src/main/java/com/unrealdinnerbone/jamd/data/RecipeProvider.java @@ -4,6 +4,7 @@ import com.unrealdinnerbone.jamd.JAMDRegistry; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; +import net.minecraft.core.HolderLookup; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.data.recipes.ShapedRecipeBuilder; @@ -11,11 +12,13 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Blocks; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class RecipeProvider extends FabricRecipeProvider { - public RecipeProvider(FabricDataOutput output) { - super(output); + + public RecipeProvider(FabricDataOutput output, CompletableFuture registryLookup) { + super(output, registryLookup); } @Override diff --git a/forge/src/main/resources/META-INF/accesstransformer.cfg b/forge/src/main/resources/META-INF/accesstransformer.cfg index b51ff60..b9db03c 100644 --- a/forge/src/main/resources/META-INF/accesstransformer.cfg +++ b/forge/src/main/resources/META-INF/accesstransformer.cfg @@ -4,3 +4,4 @@ public net.minecraft.world.level.levelgen.placement.HeightRangePlacement f_19167 public net.minecraft.world.level.levelgen.placement.CountPlacement f_191624_ public net.minecraft.world.level.levelgen.heightproviders.ConstantHeight f_161947_ public net.minecraft.world.level.biome.BiomeGenerationSettings f_186648_ +public net.minecraft.data.worldgen.biome.OverworldBiomes m_194843_(F)I diff --git a/gradle.properties b/gradle.properties index 3b8a856..68d6138 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Project -mod_version=4.2.2 +mod_version=5.0.0 maven_group=com.unrealdinnerbone curse_id=422981 mod_name=JAMD @@ -8,23 +8,23 @@ mod_id=jamd # Common -minecraft_version=1.20.4 +minecraft_version=1.20.5 # Forge -forge_version=49.0.30 +#forge_version=49.0.30 -neo_version=20.4.189 +neo_version=20.5.0-beta -fabric_version=0.96.4+1.20.4 -fabric_loader_version=0.15.7 +fabric_version=0.97.6+1.20.5 +fabric_loader_version=0.15.10 # Other -trenzalore_version=4.0.1 +trenzalore_version=5.0.1 # Gradle org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false #Compact -mekanism_version=1.20.4-10.5.0.22 -immersive_engineering_version=1.20.4-10.0.1-pre.177 +#mekanism_version=1.20.4-10.5.0.22 +#immersive_engineering_version=1.20.4-10.0.1-pre.177 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17655d0..48c0a02 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/neo/build.gradle b/neo/build.gradle index d73010e..626a9cc 100644 --- a/neo/build.gradle +++ b/neo/build.gradle @@ -5,8 +5,8 @@ multiLoader.neo() { dependencies { implementation("com.unrealdinnerbone:trenzalore-neo:${project.property("trenzalore_version")}+mc${project.property("minecraft_version")}") - api "mekanism:Mekanism:${mekanism_version}" - api "blusunrize.immersiveengineering:ImmersiveEngineering:${immersive_engineering_version}" +// api "mekanism:Mekanism:${mekanism_version}" +// api "blusunrize.immersiveengineering:ImmersiveEngineering:${immersive_engineering_version}" } publishing.publications.mavenJava.from components.java diff --git a/neo/src/main/java/com/unrealdinnerbone/jamd/neo/JAMDNeo.java b/neo/src/main/java/com/unrealdinnerbone/jamd/neo/JAMDNeo.java index d324ca0..6fd1daf 100644 --- a/neo/src/main/java/com/unrealdinnerbone/jamd/neo/JAMDNeo.java +++ b/neo/src/main/java/com/unrealdinnerbone/jamd/neo/JAMDNeo.java @@ -1,14 +1,11 @@ package com.unrealdinnerbone.jamd.neo; import com.unrealdinnerbone.jamd.JAMD; -import com.unrealdinnerbone.jamd.api.FeatureTypeRegistry; import com.unrealdinnerbone.jamd.command.JamdCommand; -import com.unrealdinnerbone.jamd.neo.compact.IECompact; import net.neoforged.fml.common.Mod; import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.event.RegisterCommandsEvent; import net.neoforged.neoforge.event.server.ServerStartingEvent; -import com.unrealdinnerbone.jamd.neo.compact.MekenismOreCompact; @Mod(JAMD.MOD_ID) public class JAMDNeo { @@ -21,8 +18,8 @@ public JAMDNeo() { } public static void registerCompact() { - FeatureTypeRegistry.register("mekanism", "ore", MekenismOreCompact::new); - FeatureTypeRegistry.register("immersiveengineering", "ie_ore", IECompact::new); +// FeatureTypeRegistry.register("mekanism", "ore", MekenismOreCompact::new); +// FeatureTypeRegistry.register("immersiveengineering", "ie_ore", IECompact::new); } public void onRegisterCommands(RegisterCommandsEvent event) { diff --git a/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/IECompact.java b/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/IECompact.java index c9fe8b7..5d15f90 100644 --- a/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/IECompact.java +++ b/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/IECompact.java @@ -1,22 +1,22 @@ -package com.unrealdinnerbone.jamd.neo.compact; - -import blusunrize.immersiveengineering.common.world.IEOreFeature; -import com.mojang.serialization.Codec; -import com.unrealdinnerbone.jamd.OresCodec; -import com.unrealdinnerbone.jamd.api.IFeatureTypeCompact; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.levelgen.placement.PlacementModifier; - -import java.util.List; - -public class IECompact implements IFeatureTypeCompact { - - public static final ResourceLocation ID = new ResourceLocation("immersiveengineering", "ie_ore"); - - @Override - public OresCodec parse(IEOreFeature.IEOreFeatureConfig value, List placementModifiers) { - return new OresCodec(value.getSize(), (float) value.getAirExposure(), placementModifiers, value.targetList()); - } - - -} +//package com.unrealdinnerbone.jamd.neo.compact; +// +//import blusunrize.immersiveengineering.common.world.IEOreFeature; +//import com.mojang.serialization.Codec; +//import com.unrealdinnerbone.jamd.OresCodec; +//import com.unrealdinnerbone.jamd.api.IFeatureTypeCompact; +//import net.minecraft.resources.ResourceLocation; +//import net.minecraft.world.level.levelgen.placement.PlacementModifier; +// +//import java.util.List; +// +//public class IECompact implements IFeatureTypeCompact { +// +// public static final ResourceLocation ID = new ResourceLocation("immersiveengineering", "ie_ore"); +// +// @Override +// public OresCodec parse(IEOreFeature.IEOreFeatureConfig value, List placementModifiers) { +// return new OresCodec(value.getSize(), (float) value.getAirExposure(), placementModifiers, value.targetList()); +// } +// +// +//} diff --git a/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/MekenismOreCompact.java b/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/MekenismOreCompact.java index 9c2223b..5484136 100644 --- a/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/MekenismOreCompact.java +++ b/neo/src/main/java/com/unrealdinnerbone/jamd/neo/compact/MekenismOreCompact.java @@ -1,18 +1,18 @@ -package com.unrealdinnerbone.jamd.neo.compact; - -import com.unrealdinnerbone.jamd.OresCodec; -import com.unrealdinnerbone.jamd.api.IFeatureTypeCompact; -import mekanism.common.world.ResizableOreFeatureConfig; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.levelgen.placement.PlacementModifier; - -import java.util.List; - -public class MekenismOreCompact implements IFeatureTypeCompact { - - @Override - public OresCodec parse(ResizableOreFeatureConfig config, List placementModifiers) { - return new OresCodec(config.size().getAsInt(), config.discardChanceOnAirExposure().getAsFloat(), placementModifiers, config.targetStates()); - } - -} +//package com.unrealdinnerbone.jamd.neo.compact; +// +//import com.unrealdinnerbone.jamd.OresCodec; +//import com.unrealdinnerbone.jamd.api.IFeatureTypeCompact; +//import mekanism.common.world.ResizableOreFeatureConfig; +//import net.minecraft.resources.ResourceLocation; +//import net.minecraft.world.level.levelgen.placement.PlacementModifier; +// +//import java.util.List; +// +//public class MekenismOreCompact implements IFeatureTypeCompact { +// +// @Override +// public OresCodec parse(ResizableOreFeatureConfig config, List placementModifiers) { +// return new OresCodec(config.size().getAsInt(), config.discardChanceOnAirExposure().getAsFloat(), placementModifiers, config.targetStates()); +// } +// +//} diff --git a/neo/src/main/resources/META-INF/accesstransformer.cfg b/neo/src/main/resources/META-INF/accesstransformer.cfg index 83f2979..e5a0e1f 100644 --- a/neo/src/main/resources/META-INF/accesstransformer.cfg +++ b/neo/src/main/resources/META-INF/accesstransformer.cfg @@ -4,3 +4,4 @@ public net.minecraft.world.level.levelgen.placement.HeightRangePlacement height public net.minecraft.world.level.levelgen.placement.CountPlacement count public net.minecraft.world.level.levelgen.heightproviders.ConstantHeight value public net.minecraft.world.level.biome.BiomeGenerationSettings featureSet +public net.minecraft.data.worldgen.biome.OverworldBiomes calculateSkyColor(F)I diff --git a/neo/src/main/resources/META-INF/mods.toml b/neo/src/main/resources/META-INF/neoforge.mods.toml similarity index 100% rename from neo/src/main/resources/META-INF/mods.toml rename to neo/src/main/resources/META-INF/neoforge.mods.toml diff --git a/settings.gradle b/settings.gradle index 91c2120..483400a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,4 +17,4 @@ pluginManagement { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' } -include("common", "neo", "fabric", "forge") \ No newline at end of file +include("common", "neo", "fabric") \ No newline at end of file