Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master-1.19-lts' into master-1.2…
Browse files Browse the repository at this point in the history
…0-lts
  • Loading branch information
rubensworks committed Jul 31, 2024
2 parents 75633f3 + b662708 commit 90abd51
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ dependencies {
/*runtimeOnly(fg.deobf("com.refinedmods:refinedstorage:${project.refinedstorage_version}")) { // https://repo.refinedmods.com/com/refinedmods/refinedstorage/
transitive = false
}*/

implementation fg.deobf("com.github.glitchfiend:TerraBlender-forge:${project.terrablender_version}")
}

minecraft {
Expand All @@ -146,6 +148,9 @@ minecraft {
workingDirectory project.file('run')
//property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile',"${buildDir}/createSrgToMcp/output.srg"

mods {
integrateddynamics {
source sourceSets.main
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_version=1.0.0
minecraft_version=1.20.1
forge_version=47.0.1
forge_version=47.3.5
cyclopscore_version=1.18.4-340
integrateddynamics_version=1.20.1-1.16.7-575
release_type=release
Expand All @@ -22,6 +22,7 @@ ie_version=0.12-90-521
crafttweakerapi_version=4.1.6.457
crafttweakermain_version=1.12-4.1.6.457
signals_version=1.12.2:1.1.0-2
terrablender_version=1.20.1-3.0.1.7

# Workaround for Spotless bug
# https://github.com/diffplug/spotless/issues/834
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ public class GeneralConfig extends DummyConfig {
@ConfigurableProperty(category = "core", comment = "If JEI recipe filling should heuristically try to determine item tags from recipes.", requiresMcRestart = true)
public static boolean jeiHeuristicTags = true;

@ConfigurableProperty(
category = "biome",
comment = "The weight of spawning in the overworld, 0 disables spawning.",
minimalValue = 0
)
public static int meneglinBiomeSpawnWeight = 5;

/**
* Create a new instance.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.cyclops.integrateddynamicscompat.modcompat.capabilities.WorkerDryingBasinBlockEntityCompat;
import org.cyclops.integrateddynamicscompat.modcompat.capabilities.WorkerMechanicalMachineBlockEntityCompat;
import org.cyclops.integrateddynamicscompat.modcompat.capabilities.WorkerSqueezerBlockEntityCompat;
import org.cyclops.integrateddynamicscompat.modcompat.terrablender.TerrablenderCompat;
import org.cyclops.integrateddynamicscompat.modcompat.top.TopModCompat;
import org.cyclops.integrateddynamicscompat.proxy.ClientProxy;
import org.cyclops.integrateddynamicscompat.proxy.CommonProxy;
Expand All @@ -39,6 +40,7 @@ public IntegratedDynamicsCompat() {
protected void loadModCompats(ModCompatLoader modCompatLoader) {
super.loadModCompats(modCompatLoader);
modCompatLoader.addModCompat(new TopModCompat());
modCompatLoader.addModCompat(new TerrablenderCompat());
// TODO: temporarily disable some mod compats
// Mod compats
// modCompatLoader.addModCompat(new RefinedStorageModCompat());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public class Reference {
public static final String MOD_TOP = "theoneprobe";
public static final String MOD_WAILA = "waila";
public static final String MOD_REFINEDSTORAGE = "refinedstorage";
public static final String MOD_TERRABLENDER = "terrablender";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package org.cyclops.integrateddynamicscompat.modcompat.terrablender;

import org.cyclops.cyclopscore.modcompat.ICompatInitializer;
import org.cyclops.cyclopscore.modcompat.IModCompat;
import org.cyclops.integrateddynamicscompat.Reference;

/**
* Compatibility plugin for Terrablender.
* @author rubensworks
*
*/
public class TerrablenderCompat implements IModCompat {

@Override
public String getId() {
return Reference.MOD_TERRABLENDER;
}

@Override
public boolean isEnabledDefault() {
return true;
}

@Override
public String getComment() {
return "Injection of biomes.";
}

@Override
public ICompatInitializer createInitializer() {
return new TerrablenderCompatInitializer();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.cyclops.integrateddynamicscompat.modcompat.terrablender;

import net.minecraft.resources.ResourceLocation;
import org.cyclops.cyclopscore.modcompat.ICompatInitializer;
import org.cyclops.integrateddynamics.Reference;
import org.cyclops.integrateddynamicscompat.GeneralConfig;
import terrablender.api.Regions;

/**
* @author rubensworks
*/
public class TerrablenderCompatInitializer implements ICompatInitializer {
@Override
public void initialize() {
if (GeneralConfig.meneglinBiomeSpawnWeight > 0) {
Regions.register(new TestRegion(new ResourceLocation(Reference.MOD_ID, "overworld"), GeneralConfig.meneglinBiomeSpawnWeight));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.cyclops.integrateddynamicscompat.modcompat.terrablender;

import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.Biomes;
import net.minecraft.world.level.biome.Climate;
import org.cyclops.integrateddynamics.Reference;
import terrablender.api.Region;
import terrablender.api.RegionType;

import java.util.function.Consumer;

/**
* @author rubensworks
*/
public class TestRegion extends Region
{
public TestRegion(ResourceLocation name, int weight) {
super(name, RegionType.OVERWORLD, weight);
}

@Override
public void addBiomes(Registry<Biome> registry, Consumer<com.mojang.datafixers.util.Pair<Climate.ParameterPoint, ResourceKey<Biome>>> mapper) {
this.addModifiedVanillaOverworldBiomes(mapper, builder -> {
builder.replaceBiome(Biomes.FOREST, ResourceKey.create(Registries.BIOME, new ResourceLocation(Reference.MOD_ID, "meneglin")));
});
}
}

0 comments on commit 90abd51

Please sign in to comment.