diff options
| -rw-r--r-- | TODO.md | 1 | ||||
| -rw-r--r-- | gradle.properties | 2 | ||||
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java | 4 | ||||
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/recipe/SimplifiedRecipe.java | 4 | ||||
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/utils/ForeignUtils.java | 4 |
5 files changed, 8 insertions, 7 deletions
| @@ -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 | ||
| 4 | groupid = lv.enes.mc | 4 | groupid = lv.enes.mc |
| 5 | modid = eris_alchemy | 5 | modid = eris_alchemy |
| 6 | modVersion = 0.2.2 | 6 | modVersion = 0.2.3-SNAPSHOT |
| 7 | 7 | ||
| 8 | loomPluginVersion = 1.4.1 | 8 | loomPluginVersion = 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; | |||
| 24 | import java.util.Arrays; | 24 | import java.util.Arrays; |
| 25 | import java.util.Collection; | 25 | import java.util.Collection; |
| 26 | import java.util.List; | 26 | import java.util.List; |
| 27 | import java.util.Objects; | ||
| 28 | import java.util.function.Predicate; | 27 | import java.util.function.Predicate; |
| 29 | import java.util.function.Supplier; | 28 | import java.util.function.Supplier; |
| 30 | import java.util.stream.Stream; | 29 | import java.util.stream.Stream; |
| 31 | 30 | ||
| 32 | public record SimplifiedRecipe(ItemStack output, List<ItemStack> remainder, List<Supplier<Ingredient>> input) { | 31 | public 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 @@ | |||
| 1 | package lv.enes.mc.eris_alchemy.utils; | 1 | package lv.enes.mc.eris_alchemy.utils; |
| 2 | 2 | ||
| 3 | public class ForeignUtils { | 3 | public 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; |