Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if(env.COMMIT_HASH != null) {

repositories {
maven { url = "https://maven.nucleoid.xyz/" }
maven { url = "https://maven.nucleoid.xyz/snapshots" }
maven { url = "https://maven.gegy.dev/" }
}

Expand All @@ -28,6 +29,8 @@ dependencies {

implementation "xyz.nucleoid:plasmid:${project.plasmid_version}"

implementation "fr.hugman:ultimate_lucky_block:${project.ultimate_lucky_block_version}"

runtimeOnly "eu.pb4:factorytools:0.11.0+26.2"
}

Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ loom_version=1.17-SNAPSHOT
fabric_api_version=0.152.1+26.2

# check this on https://nucleoid.xyz/use/
plasmid_version=0.7.2-SNAPSHOT+26.2
plasmid_version=0.7.2-SNAPSHOT+26.2

# check this on https://maven.nucleoid.xyz/
ultimate_lucky_block_version=1.0.0+29eeda3
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import fr.hugman.uhc.api.config.UHCConfigs;
import fr.hugman.uhc.api.config.UHCMapConfig;
import fr.hugman.uhc.api.config.UHCTimersConfig;
import fr.hugman.uhc.api.module.UHCModules;
import fr.hugman.uhc.api.registry.UHCModuleTags;
import fr.hugman.uhc.api.registry.UHCRegistryKeys;
import fr.hugman.uhc.api.tags.UHCBiomeTags;
Expand All @@ -12,6 +13,7 @@
import net.fabricmc.fabric.api.datagen.v1.FabricPackOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.HolderSet;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstrapContext;
import net.minecraft.world.level.biome.MultiNoiseBiomeSource;
Expand Down Expand Up @@ -70,5 +72,27 @@ public static void register(BootstrapContext<UHCConfig> registerable) {
new DoubleRange(200, 8000),
0.75D
), UHCTimersConfig.DEFAULT.withWarmup(600), modules.getOrThrow(UHCModuleTags.DOUBLERUNNER)));

registerable.register(UHCConfigs.LUCKY_UHC, new UHCConfig(UHCMapConfig.of(
dimensionsTypes.getOrThrow(BuiltinDimensionTypes.OVERWORLD),
overworldChunkGenerator,
biomes.getOrThrow(UHCBiomeTags.OCEANLESS_BLACKLIST),
new DoubleRange(400, 10000),
0.5D
), UHCTimersConfig.DEFAULT, HolderSet.direct(modules.getOrThrow(UHCModules.LUCKY_BLOCKS))));
registerable.register(UHCConfigs.LUCKY_UHCRUN, new UHCConfig(UHCMapConfig.of(
dimensionsTypes.getOrThrow(BuiltinDimensionTypes.OVERWORLD),
overworldChunkGenerator,
biomes.getOrThrow(UHCBiomeTags.OCEANLESS_BLACKLIST),
new DoubleRange(200, 8000),
0.6D
), UHCTimersConfig.DEFAULT.withWarmup(1200), modules.getOrThrow(UHCModuleTags.LUCKY_UHCRUN)));
registerable.register(UHCConfigs.LUCKY_DOUBLERUNNER, new UHCConfig(UHCMapConfig.of(
dimensionsTypes.getOrThrow(BuiltinDimensionTypes.OVERWORLD),
overworldChunkGenerator,
biomes.getOrThrow(UHCBiomeTags.OCEANLESS_BLACKLIST),
new DoubleRange(200, 8000),
0.75D
), UHCTimersConfig.DEFAULT.withWarmup(600), modules.getOrThrow(UHCModuleTags.LUCKY_DOUBLERUNNER)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import fr.hugman.uhc.api.registry.UHCRegistryKeys;
import fr.hugman.uhc.api.world.level.levelgen.feature.UHCPlacedFeatures;
import fr.hugman.uhc.impl.UHC;
import fr.hugman.ultimate_lucky_block.api.block.ULBBlocks;
import fr.hugman.ultimate_lucky_block.api.world.gen.feature.ULBPlacedFeatures;
import net.fabricmc.fabric.api.datagen.v1.FabricPackOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider;
import net.minecraft.core.HolderLookup;
Expand Down Expand Up @@ -98,6 +100,13 @@ public static void register(BootstrapContext<UHCModule> registerable) {
)))
.descriptionFrom(UHCModules.ORE_BOOST));
//TODO: other modules

register(registerable, UHCModules.LUCKY_BLOCKS, ULBBlocks.LUCKY_BLOCK,
new PlacedFeaturesModifier(HolderSet.direct(
placedFeatures.getOrThrow(ULBPlacedFeatures.SURFACE_LUCKY_BLOCKS),
placedFeatures.getOrThrow(ULBPlacedFeatures.MINERAL_LUCKY_BLOCKS)
))
);
}

public static void register(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fr.hugman.uhc.api.datagen.provider;

import fr.hugman.uhc.api.module.UHCModule;
import fr.hugman.uhc.api.module.UHCModules;
import fr.hugman.uhc.api.registry.UHCModuleTags;
import fr.hugman.uhc.api.registry.UHCRegistryKeys;
import net.fabricmc.fabric.api.datagen.v1.FabricPackOutput;
Expand Down Expand Up @@ -40,5 +41,12 @@ protected void addTags(HolderLookup.Provider wrapperLookup) {
.addOptional(MOB_COOKED_FOOD)
.addOptional(FASTER_RESOURCES_PLUS)
.addOptional(POTION_DROPS);

builder(UHCModuleTags.UHCRUN)
.forceAddTag(UHCModuleTags.UHCRUN)
.add(UHCModules.LUCKY_BLOCKS);
builder(UHCModuleTags.LUCKY_DOUBLERUNNER)
.forceAddTag(UHCModuleTags.LUCKY_DOUBLERUNNER)
.add(UHCModules.LUCKY_BLOCKS);
}
}
5 changes: 5 additions & 0 deletions src/main/java/fr/hugman/uhc/api/config/UHCConfigs.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ public class UHCConfigs {
public static final ResourceKey<UHCConfig> STANDARD_UHCRUN = of("uhcrun");
public static final ResourceKey<UHCConfig> STANDARD_DOUBLERUNNER = of("doublerunner");

// [COMPAT] Ultimate Lucky Block
public static final ResourceKey<UHCConfig> LUCKY_UHC = of("lucky_uhc");
public static final ResourceKey<UHCConfig> LUCKY_UHCRUN = of("lucky_uhcrun");
public static final ResourceKey<UHCConfig> LUCKY_DOUBLERUNNER = of("lucky_doublerunner");

private static ResourceKey<UHCConfig> of(String path) {
return ResourceKey.create(UHCRegistryKeys.UHC_CONFIG, UHC.id(path));
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/fr/hugman/uhc/api/module/UHCModules.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class UHCModules {
public static final ResourceKey<UHCModule> FASTER_RESOURCES_PLUS = of("faster_resources_plus");
public static final ResourceKey<UHCModule> BETTER_TOOLS_PLUS = of("better_tools_plus");

// [COMPAT] Ultimate Lucky Block
public static final ResourceKey<UHCModule> LUCKY_BLOCKS = of("lucky_blocks");

public static ResourceKey<UHCModule> of(String path) {
return ResourceKey.create(UHCRegistryKeys.UHC_MODULE, UHC.id(path));
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/fr/hugman/uhc/api/registry/UHCModuleTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ public class UHCModuleTags {
public static final TagKey<UHCModule> UHCRUN = of("uhcrun");
public static final TagKey<UHCModule> DOUBLERUNNER = of("doublerunner");

// [COMPAT] Ultimate Lucky Block
public static final TagKey<UHCModule> LUCKY_UHCRUN = of("lucky_uhcrun");
public static final TagKey<UHCModule> LUCKY_DOUBLERUNNER = of("lucky_doublerunner");

private static TagKey<UHCModule> of(String path) {
return TagKey.create(UHCRegistryKeys.UHC_MODULE, UHC.id(path));
}
Expand Down