diff options
| author | 2024-01-11 23:11:27 +0100 | |
|---|---|---|
| committer | 2024-01-11 23:11:27 +0100 | |
| commit | bca6a74e9a17e04de419743850f66af96a6473cc (patch) | |
| tree | 6f81c0ceb615b0a85810df89ea9acafe6112eba9 /src/main/java/lv/enes/mc/eris_alchemy/block | |
| parent | Making SheetsMixin more extensible (diff) | |
| download | mc-eris-alchemy-bca6a74e9a17e04de419743850f66af96a6473cc.tar.gz mc-eris-alchemy-bca6a74e9a17e04de419743850f66af96a6473cc.tar.xz mc-eris-alchemy-bca6a74e9a17e04de419743850f66af96a6473cc.zip | |
Move default emc values to JSON files in datapack
Diffstat (limited to 'src/main/java/lv/enes/mc/eris_alchemy/block')
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/block/EnergyCondenserBlock.java | 4 | ||||
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/block/entity/EnergyCondenserEntity.java | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/block/EnergyCondenserBlock.java b/src/main/java/lv/enes/mc/eris_alchemy/block/EnergyCondenserBlock.java index 86ac061..af58fc6 100644 --- a/src/main/java/lv/enes/mc/eris_alchemy/block/EnergyCondenserBlock.java +++ b/src/main/java/lv/enes/mc/eris_alchemy/block/EnergyCondenserBlock.java | |||
| @@ -2,7 +2,7 @@ package lv.enes.mc.eris_alchemy.block; | |||
| 2 | 2 | ||
| 3 | import jakarta.annotation.Nonnull; | 3 | import jakarta.annotation.Nonnull; |
| 4 | import jakarta.annotation.Nullable; | 4 | import jakarta.annotation.Nullable; |
| 5 | import lv.enes.mc.eris_alchemy.EMC; | 5 | import lv.enes.mc.eris_alchemy.Emc; |
| 6 | import lv.enes.mc.eris_alchemy.EmcStorage; | 6 | import lv.enes.mc.eris_alchemy.EmcStorage; |
| 7 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry; | 7 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry; |
| 8 | import lv.enes.mc.eris_alchemy.block.entity.EnergyCondenserEntity; | 8 | import lv.enes.mc.eris_alchemy.block.entity.EnergyCondenserEntity; |
| @@ -33,7 +33,7 @@ public class EnergyCondenserBlock extends ChestLikeBlock<EnergyCondenserEntity> | |||
| 33 | TooltipFlag options | 33 | TooltipFlag options |
| 34 | ) { | 34 | ) { |
| 35 | if (getStoredEmc(stack) >= 0.1) { | 35 | if (getStoredEmc(stack) >= 0.1) { |
| 36 | tooltip.add(Component.literal("Stored EMC: %s".formatted(EMC.formatEmc(getStoredEmc(stack))))); | 36 | tooltip.add(Component.literal("Stored EMC: %s".formatted(Emc.formatEmc(getStoredEmc(stack))))); |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | 39 | ||
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 0f39ccb..a264722 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 | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | package lv.enes.mc.eris_alchemy.block.entity; | 1 | package lv.enes.mc.eris_alchemy.block.entity; |
| 2 | 2 | ||
| 3 | import jakarta.annotation.Nonnull; | 3 | import jakarta.annotation.Nonnull; |
| 4 | import lv.enes.mc.eris_alchemy.EMC; | 4 | import lv.enes.mc.eris_alchemy.Emc; |
| 5 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry.BlockEntities; | 5 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry.BlockEntities; |
| 6 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry.Blocks; | 6 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry.Blocks; |
| 7 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry.Materials; | 7 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry.Materials; |
| @@ -81,7 +81,7 @@ public class EnergyCondenserEntity extends ChestLikeEntity implements ExtendedSc | |||
| 81 | @Override | 81 | @Override |
| 82 | public void tick(Level world, BlockPos pos, BlockState state) { | 82 | public void tick(Level world, BlockPos pos, BlockState state) { |
| 83 | super.tick(world, pos, state); | 83 | super.tick(world, pos, state); |
| 84 | EMC.getInstance(world).get(items.get(0)).ifPresent(cost -> { | 84 | Emc.getInstance(world).get(items.get(0)).ifPresent(cost -> { |
| 85 | tryConsumeEmc(world, cost); | 85 | tryConsumeEmc(world, cost); |
| 86 | tryCloneTemplate(cost); | 86 | tryCloneTemplate(cost); |
| 87 | }); | 87 | }); |
| @@ -128,7 +128,7 @@ public class EnergyCondenserEntity extends ChestLikeEntity implements ExtendedSc | |||
| 128 | return; | 128 | return; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | var emc = EMC.getInstance(world); | 131 | var emc = Emc.getInstance(world); |
| 132 | var template = items.get(0); | 132 | var template = items.get(0); |
| 133 | var sacrifice = items.stream() | 133 | var sacrifice = items.stream() |
| 134 | .skip(1) // skip the template | 134 | .skip(1) // skip the template |