Skip to content

Commit

Permalink
- water can now freeze on moon and glacio (config option)
Browse files Browse the repository at this point in the history
- add 2 new config options (default to false)
- update ko_kr language
- add 3 new language (Canadian French (fr_ca), French (fr_fr) and Brazilian Portuguese (pt_br)
  • Loading branch information
st0x0ef committed Feb 12, 2023
1 parent f3cd41d commit b9e6cc9
Show file tree
Hide file tree
Showing 8 changed files with 1,086 additions and 72 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ repositories {
maven { name = "Progwml6 maven"; url = "https://dvs1.progwml6.com/files/maven/" }
maven { name = "ModMaven"; url = "https://modmaven.dev" }
maven { name = "CurseForge"; url = "https://www.cursemaven.com" }
/** Craft Tweaker */
//maven { name = "BlameJared maven"; url = "https://maven.blamejared.com" }
}

mixin {
Expand All @@ -107,6 +109,9 @@ dependencies {

/** Mekanism */
implementation fg.deobf("mekanism:Mekanism:${mc_version}-${mekanism_version}")

/** Craft Tweaker */
//implementation fg.deobf("com.blamejared.crafttweaker:CraftTweaker-forge-${mc_version}:${crafttweaker_version}")
}

jar {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=6.3j
mod_version=6.4

mc_version=1.19.2
loader_version=43
Expand All @@ -12,3 +12,4 @@ version_jei=238222:4128326
top_file=3965693
jade_file=4010505
mekanism_version=10.3.4.471
crafttweaker_version=10.1.33
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public class Config {

public static final ForgeConfigSpec.ConfigValue<Integer> ROCKET_TIER_4_FUEL_BUCKETS;

public static final ForgeConfigSpec.ConfigValue<Boolean> WATER_TO_ICE_MOON;
public static final ForgeConfigSpec.ConfigValue<Boolean> WATER_TO_ICE_GLACIO;


static {
BUILDER.push("Beyond Earth Config");
Expand Down Expand Up @@ -206,6 +209,13 @@ public class Config {
STEEL_MANAGEMENT = BUILDER.comment("Management Steel Items", "0: Default, Nothing special, Use steel items as-is", "1: Iron Ingot can't blasting into be steel ingot", "2: Additionally, Steel Block and Ingot and Nugget are can't conversion to each shape", " And hide Steel Block, Ingot, Nugget in JEI").defineInRange("Steel Management", 0, 0, 2);
BUILDER.pop();*/
SPEC = BUILDER.build();

/** Water to ice */
BUILDER.push("Water to Ice");
WATER_TO_ICE_MOON = BUILDER.comment("Enable or Disable Water the transformation of water into ice on the moon").define("Water to ice moon", false);
WATER_TO_ICE_GLACIO = BUILDER.comment("Enable or Disable Water the transformation of water into ice on glacio").define("Water to ice glacio", false);
BUILDER.pop();

SPEC = BUILDER.build();
}
}
13 changes: 13 additions & 0 deletions src/main/java/net/mrscauthd/beyond_earth/mixin/BlockPlace.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package net.mrscauthd.beyond_earth.mixin;

import mekanism.common.lib.math.Plane;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.MinecraftForge;
import net.mrscauthd.beyond_earth.common.config.Config;
import net.mrscauthd.beyond_earth.common.events.forge.BlockSetEvent;
import net.mrscauthd.beyond_earth.common.registries.LevelRegistry;
import net.mrscauthd.beyond_earth.common.registries.PlanetsRegistry;
import net.mrscauthd.beyond_earth.common.util.Planets;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -17,6 +23,13 @@ public class BlockPlace {
private void setBlock(BlockPos blockPos, BlockState blockState, int p_46607_, int p_46608_, CallbackInfoReturnable<Boolean> cir) {
Level level = (Level) ((Object) this);

if ((level.dimension().equals(LevelRegistry.MOON) && Config.WATER_TO_ICE_MOON.get()) ||
(level.dimension().equals(LevelRegistry.GLACIO) && Config.WATER_TO_ICE_GLACIO.get())) {
if (level.getBlockState(blockPos).equals(Blocks.WATER)) {
level.setBlock(blockPos, Blocks.ICE.defaultBlockState(), 4096);
}
}

if (MinecraftForge.EVENT_BUS.post(new BlockSetEvent(level, blockPos, blockState, p_46607_, p_46608_))) {
cir.cancel();
}
Expand Down
330 changes: 330 additions & 0 deletions src/main/resources/assets/beyond_earth/lang/fr_ca.json

Large diffs are not rendered by default.

330 changes: 330 additions & 0 deletions src/main/resources/assets/beyond_earth/lang/fr_fr.json

Large diffs are not rendered by default.

135 changes: 65 additions & 70 deletions src/main/resources/assets/beyond_earth/lang/ko_kr.json

Large diffs are not rendered by default.

330 changes: 330 additions & 0 deletions src/main/resources/assets/beyond_earth/lang/pt_br.json

Large diffs are not rendered by default.

0 comments on commit b9e6cc9

Please sign in to comment.