summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.md1
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java4
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/recipe/SimplifiedRecipe.java4
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/utils/ForeignUtils.java4
5 files changed, 8 insertions, 7 deletions
diff --git a/TODO.md b/TODO.md
index 4216084..6eb94a4 100644
--- a/TODO.md
+++ b/TODO.md
@@ -4,5 +4,4 @@
4- proper EmcLoader with separate prepare and apply stages 4- proper EmcLoader with separate prepare and apply stages
5- use badpackets for communication 5- use badpackets for communication
6- maybe neoforge support in the future? Like when I go to 1.21.x. 6- maybe neoforge support in the future? Like when I go to 1.21.x.
7- make crossbow & shield repairable with low covalence dust
8- Support all of my modpack :3 \ No newline at end of file 7- Support all of my modpack :3 \ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 7735685..54f1bab 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,7 +3,7 @@ org.gradle.parallel = true
3 3
4groupid = lv.enes.mc 4groupid = lv.enes.mc
5modid = eris_alchemy 5modid = eris_alchemy
6modVersion = 0.2.2 6modVersion = 0.2.3-SNAPSHOT
7 7
8loomPluginVersion = 1.4.1 8loomPluginVersion = 1.4.1
9 9
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java b/src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java
index 105e9e3..0aa14fe 100644
--- a/src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java
+++ b/src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java
@@ -95,6 +95,10 @@ public class EnergyCondenserEntity extends ChestLikeEntity implements EmcStorage
95 @Override 95 @Override
96 public void tick(Level world, BlockPos pos, BlockState state) { 96 public void tick(Level world, BlockPos pos, BlockState state) {
97 super.tick(world, pos, state); 97 super.tick(world, pos, state);
98 if (world.isClientSide) {
99 return;
100 }
101
98 var cost = getMaxEmc(); 102 var cost = getMaxEmc();
99 tryConsumeEmc(cost); 103 tryConsumeEmc(cost);
100 tryCloneTemplate(cost); 104 tryCloneTemplate(cost);
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/recipe/SimplifiedRecipe.java b/src/main/java/lv/enes/mc/eris_alchemy/recipe/SimplifiedRecipe.java
index 6bb1274..0a6a5a0 100644
--- a/src/main/java/lv/enes/mc/eris_alchemy/recipe/SimplifiedRecipe.java
+++ b/src/main/java/lv/enes/mc/eris_alchemy/recipe/SimplifiedRecipe.java
@@ -24,14 +24,14 @@ import java.lang.reflect.Type;
24import java.util.Arrays; 24import java.util.Arrays;
25import java.util.Collection; 25import java.util.Collection;
26import java.util.List; 26import java.util.List;
27import java.util.Objects;
28import java.util.function.Predicate; 27import java.util.function.Predicate;
29import java.util.function.Supplier; 28import java.util.function.Supplier;
30import java.util.stream.Stream; 29import java.util.stream.Stream;
31 30
32public record SimplifiedRecipe(ItemStack output, List<ItemStack> remainder, List<Supplier<Ingredient>> input) { 31public record SimplifiedRecipe(ItemStack output, List<ItemStack> remainder, List<Supplier<Ingredient>> input) {
33 public static List<SimplifiedRecipe> of(Recipe<?> recipe, RegistryAccess registryAccess) { 32 public static List<SimplifiedRecipe> of(Recipe<?> recipe, RegistryAccess registryAccess) {
34 if (ForeignUtils.IS_CHIPPED_AVAILABLE && recipe instanceof ChippedRecipe chippedRecipe) { 33 if (ForeignUtils.isClassAvailable("earth.terrarium.chipped.common.recipe.ChippedRecipe")
34 && recipe instanceof ChippedRecipe chippedRecipe) {
35 var remainder = List.<ItemStack>of(); 35 var remainder = List.<ItemStack>of();
36 return chippedRecipe.tags() 36 return chippedRecipe.tags()
37 .stream() 37 .stream()
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/utils/ForeignUtils.java b/src/main/java/lv/enes/mc/eris_alchemy/utils/ForeignUtils.java
index b686a9e..d31d484 100644
--- a/src/main/java/lv/enes/mc/eris_alchemy/utils/ForeignUtils.java
+++ b/src/main/java/lv/enes/mc/eris_alchemy/utils/ForeignUtils.java
@@ -1,9 +1,7 @@
1package lv.enes.mc.eris_alchemy.utils; 1package lv.enes.mc.eris_alchemy.utils;
2 2
3public class ForeignUtils { 3public class ForeignUtils {
4 public static boolean IS_CHIPPED_AVAILABLE = check("earth.terrarium.chipped.Chipped"); 4 public static boolean isClassAvailable(String className) {
5
6 private static boolean check(String className) {
7 try { 5 try {
8 Class.forName(className); 6 Class.forName(className);
9 return true; 7 return true;