From d8d652dd7e4a791daa149ce4a155f10aa5be5040 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 11:11:04 +0200 Subject: [PATCH 01/20] magic energy absorber machine --- .../electric/MagicEnergyAbsorberMachine.java | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java new file mode 100644 index 0000000000..0a88809791 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -0,0 +1,197 @@ +package com.gregtechceu.gtceu.common.machine.electric; + +import com.gregtechceu.gtceu.api.capability.IControllable; +import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; +import com.gregtechceu.gtceu.api.machine.TickableSubscription; +import com.gregtechceu.gtceu.api.machine.TieredEnergyMachine; + +import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced; +import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; +import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; + +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.boss.enderdragon.EndCrystal; +import net.minecraft.world.entity.boss.enderdragon.EnderDragon; +import net.minecraft.world.entity.boss.enderdragon.phases.DragonChargePlayerPhase; +import net.minecraft.world.entity.boss.enderdragon.phases.EnderDragonPhase; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.DragonEggBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.feature.SpikeFeature; + +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; +import lombok.Getter; +import lombok.Setter; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.List; + +public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements IControllable { + + public static final long BASE_EU_PER_FEATURE = 32; + public static final long AMPLIFIER_MULTIPLIER = 4; + + protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder( + MagicEnergyAbsorberMachine.class, + TieredEnergyMachine.MANAGED_FIELD_HOLDER); + + @DescSynced + @Persisted + @Getter + @Setter + protected boolean isWorkingEnabled; + @DescSynced + @Persisted + @Getter + @Setter + protected boolean hasAmplifier; + @Getter + protected IntList connectedFeatures; + + // subscriptions + protected TickableSubscription onServerTickSubscription; + + public MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, Object... args) { + super(holder, tier, args); + this.isWorkingEnabled = true; + this.connectedFeatures = new IntArrayList(); + } + + @Override + public @NotNull ManagedFieldHolder getFieldHolder() { + return MANAGED_FIELD_HOLDER; + } + + @Override + protected boolean isEnergyEmitter() { + return true; + } + + @Override + protected long getMaxInputOutputAmperage() { + return 4; + } + + @Override + public void onLoad() { + super.onLoad(); + if (!isRemote()) { + onServerTickSubscription = this.subscribeServerTick(() -> onServerTick(false)); + onServerTick(true); + } + } + + @Override + public void onUnload() { + super.onUnload(); + if (!isRemote()) { + resetConnectedFeatures(); + if (onServerTickSubscription != null) + this.unsubscribe(onServerTickSubscription); + } + } + + protected void onServerTick(boolean force) { + if (!(getLevel() instanceof ServerLevel serverLevel) || serverLevel.dimension() != Level.END) return; + + if (force || getOffsetTimer() % 20 == 0) + updateAmplifierStatus(); + + if (force || getOffsetTimer() % 200 == 0) + updateConnectedFeatures(); + + if (force || !serverLevel.getDragons().isEmpty()) + updateCrystalTargets(); + + if (connectedFeatures.isEmpty()) return; + + long energyPer = BASE_EU_PER_FEATURE * (hasAmplifier ? AMPLIFIER_MULTIPLIER : 1); + long energyGenerated = 0; + // double check end crystals + for (int i = 0; i < connectedFeatures.size(); i++) { + if (getLevel().getEntity(connectedFeatures.getInt(i)) instanceof EndCrystal) + energyGenerated += energyPer; + } + + if (energyGenerated > 0) + energyContainer.changeEnergy(energyGenerated); + } + + protected void updateAmplifierStatus() { + if (getLevel() == null) { + this.hasAmplifier = false; + return; + } + + BlockState blockState = getLevel().getBlockState(getPos().above()); + this.hasAmplifier = blockState.getBlock() instanceof DragonEggBlock; + } + + protected void updateConnectedFeatures() { + this.connectedFeatures.clear(); + if (getLevel() == null) return; + + // get all natural end crystals + final double maxDistance = 4096; // (64^2) + List endCrystals = SpikeFeature.getSpikesForLevel((WorldGenLevel) getLevel()).stream() + .map(spike -> getLevel().getEntitiesOfClass(EndCrystal.class, spike.getTopBoundingBox(), + crystal -> crystal.distanceToSqr(getPos().getCenter()) < maxDistance)) + .reduce(new ArrayList<>(), (lst, crystalList) -> { + lst.addAll(crystalList); + return lst; + }); + + // set end crystals beam target to this generator + endCrystals.forEach(endCrystal -> { + BlockPos beamTarget = endCrystal.getBeamTarget(); + if (getPos().equals(beamTarget)) + this.connectedFeatures.add(endCrystal.getId()); + else if (beamTarget == null) { + endCrystal.setBeamTarget(getPos()); + this.connectedFeatures.add(endCrystal.getId()); + } + }); + } + + protected void updateCrystalTargets() { + if (getLevel() == null) return; + // ender dragon check + List dragonsInRange = ((ServerLevel) getLevel()).getDragons(); + + for (EnderDragon dragon : dragonsInRange) { + if (dragon.nearestCrystal != null && connectedFeatures.contains(dragon.nearestCrystal.getId())) { + dragon.nearestCrystal = null; + + if (dragon.getPhaseManager().getCurrentPhase().getPhase() == EnderDragonPhase.HOLDING_PATTERN) { + dragon.hurt(dragon.damageSources().explosion(dragon, dragon), 10.0f); + dragon.getPhaseManager().setPhase(EnderDragonPhase.CHARGING_PLAYER); + ((DragonChargePlayerPhase) dragon.getPhaseManager().getCurrentPhase()) + .setTarget(getPos().getCenter()); + } + } + } + } + + protected void resetConnectedFeatures() { + if (getLevel() == null) { + connectedFeatures.clear(); + return; + } + + for (int id : connectedFeatures) { + Entity entity = getLevel().getEntity(id); + + if (!(entity instanceof EndCrystal endCrystal)) continue; + + if (getPos().equals(endCrystal.getBeamTarget())) + endCrystal.setBeamTarget(null); + } + + connectedFeatures.clear(); + } +} From c4e988b00aa4bc577a09d28318f9174b42dcbdc2 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 11:11:26 +0200 Subject: [PATCH 02/20] register magic energy absorber --- .../gregtechceu/gtceu/common/data/GTMachines.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 0cb4d23e70..f47e7357ea 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -563,6 +563,18 @@ public class GTMachines { .register(), LV, MV, HV, EV); + public static final MachineDefinition[] MAGIC_ENERGY_ABSORBER = registerTieredMachines("magic_energy_absorber", + MagicEnergyAbsorberMachine::new, + (tier, builder) -> builder + .rotationState(RotationState.NONE) + .langValue("%s Magic Energy Absorber %s".formatted(VLVH[tier], VLVT[tier])) + .renderer(() -> new WorkableTieredHullMachineRenderer(tier, + GTCEu.id("block/casings/magic/absorber/active"))) + .tooltips() + .compassNode("magic_energy_absorber") + .register(), + LV, MV, HV, EV); + ////////////////////////////////////// // ********* Storage *********// ////////////////////////////////////// From a0116c86fc6de1ffb461a99fdfde09b0441d94de Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 11:11:35 +0200 Subject: [PATCH 03/20] run data --- .../gtceu/compass/nodes/machines/buffer.json | 2 +- .../gtceu/compass/nodes/machines/crate.json | 2 +- .../compass/nodes/machines/creative_chest.json | 2 +- .../creative_computation_provider.json | 2 +- .../nodes/machines/creative_energy.json | 4 ++-- .../compass/nodes/machines/creative_tank.json | 2 +- .../gtceu/compass/nodes/machines/drum.json | 2 +- .../nodes/machines/magic_energy_absorber.json | 18 ++++++++++++++++++ .../compass/nodes/machines/super_chest.json | 2 +- .../compass/nodes/machines/super_tank.json | 2 +- .../resources/assets/gtceu/lang/en_ud.json | 5 +++++ .../resources/assets/gtceu/lang/en_us.json | 5 +++++ 12 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/buffer.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/buffer.json index 1ce9080382..4598eb86a4 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/buffer.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/buffer.json @@ -10,7 +10,7 @@ ], "page": "gtceu:machines/buffer", "position": [ - -100, + -50, 300 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/crate.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/crate.json index 9b8231b51d..45a526e0e2 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/crate.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/crate.json @@ -14,7 +14,7 @@ ], "page": "gtceu:machines/crate", "position": [ - -150, + -100, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_chest.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_chest.json index bef2f4add8..70c17be178 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_chest.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_chest.json @@ -8,7 +8,7 @@ ], "page": "gtceu:machines/creative_chest", "position": [ - -300, + -250, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_computation_provider.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_computation_provider.json index 61e63b7633..0426832a36 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_computation_provider.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_computation_provider.json @@ -8,7 +8,7 @@ ], "page": "gtceu:machines/creative_computation_provider", "position": [ - -400, + -350, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_energy.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_energy.json index 9cf3b485f1..869812b21c 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_energy.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_energy.json @@ -8,8 +8,8 @@ ], "page": "gtceu:machines/creative_energy", "position": [ - -50, - 300 + -400, + 350 ], "section": "gtceu:machines" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_tank.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_tank.json index 0af363f95c..4cb7ca86e2 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_tank.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/creative_tank.json @@ -8,7 +8,7 @@ ], "page": "gtceu:machines/creative_tank", "position": [ - -350, + -300, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/drum.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/drum.json index 1c3cccb2e9..4138b1d83b 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/drum.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/drum.json @@ -15,7 +15,7 @@ ], "page": "gtceu:machines/drum", "position": [ - -100, + -50, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json new file mode 100644 index 0000000000..b3c8fbf596 --- /dev/null +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json @@ -0,0 +1,18 @@ +{ + "button_texture": { + "type": "item", + "res": "gtceu:lv_magic_energy_absorber" + }, + "items": [ + "gtceu:lv_magic_energy_absorber", + "gtceu:mv_magic_energy_absorber", + "gtceu:hv_magic_energy_absorber", + "gtceu:ev_magic_energy_absorber" + ], + "page": "gtceu:machines/magic_energy_absorber", + "position": [ + -100, + 300 + ], + "section": "gtceu:machines" +} \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/super_chest.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/super_chest.json index 9f3e6d6b68..d44399a332 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/super_chest.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/super_chest.json @@ -20,7 +20,7 @@ ], "page": "gtceu:machines/super_chest", "position": [ - -250, + -200, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/super_tank.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/super_tank.json index 6d5489000a..89804a3859 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/super_tank.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/super_tank.json @@ -20,7 +20,7 @@ ], "page": "gtceu:machines/super_tank", "position": [ - -200, + -150, 350 ], "section": "gtceu:machines" diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index 2aebf95240..0b5d475b0b 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -252,6 +252,7 @@ "block.gtceu.ev_macerator": "ɹ§III ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛƎ", "block.gtceu.ev_machine_hull": "ןןnH ǝuıɥɔɐW ΛƎ", + "block.gtceu.ev_magic_energy_absorber": "ɹ§III ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_mixer": "ɹ§III ɹǝxıW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_muffler_hatch": "ΛƎϛ§ ɥɔʇɐH ɹǝןɟɟnW", "block.gtceu.ev_ore_washer": "ɹ§III ɹǝɥsɐM ǝɹO pǝɔuɐʌpⱯϛ§", @@ -396,6 +397,7 @@ "block.gtceu.hv_macerator": "ɹ§II ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛH", "block.gtceu.hv_machine_hull": "ןןnH ǝuıɥɔɐW ΛH", + "block.gtceu.hv_magic_energy_absorber": "ɹ§II ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_miner": "ɹ§II ɹǝuıW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_mixer": "ɹ§II ɹǝxıW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_muffler_hatch": "ΛH9§ ɥɔʇɐH ɹǝןɟɟnW", @@ -736,6 +738,7 @@ "block.gtceu.lv_macerator": "ɹ§ ɹoʇɐɹǝɔɐW ɔısɐᗺ", "block.gtceu.lv_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛꞀ", "block.gtceu.lv_machine_hull": "ןןnH ǝuıɥɔɐW ΛꞀ", + "block.gtceu.lv_magic_energy_absorber": "ɹ§ ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW ɔısɐᗺ", "block.gtceu.lv_miner": "ɹ§ ɹǝuıW ɔısɐᗺ", "block.gtceu.lv_mixer": "ɹ§ ɹǝxıW ɔısɐᗺ", "block.gtceu.lv_muffler_hatch": "ΛꞀㄥ§ ɥɔʇɐH ɹǝןɟɟnW", @@ -886,6 +889,7 @@ "block.gtceu.mv_macerator": "ɹ§ ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯq§", "block.gtceu.mv_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛW", "block.gtceu.mv_machine_hull": "ןןnH ǝuıɥɔɐW ΛW", + "block.gtceu.mv_magic_energy_absorber": "ɹ§ ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW pǝɔuɐʌpⱯq§", "block.gtceu.mv_miner": "ɹ§ ɹǝuıW pǝɔuɐʌpⱯq§", "block.gtceu.mv_mixer": "ɹ§ ɹǝxıW pǝɔuɐʌpⱯq§", "block.gtceu.mv_muffler_hatch": "ΛWq§ ɥɔʇɐH ɹǝןɟɟnW", @@ -1958,6 +1962,7 @@ "compass.node.gtceu.machines/ld_fluid_pipeline": "ǝuıןǝdıԀ pınןℲ pꞀ", "compass.node.gtceu.machines/ld_item_pipeline": "ǝuıןǝdıԀ ɯǝʇI pꞀ", "compass.node.gtceu.machines/macerator": "ɹoʇɐɹǝɔɐW", + "compass.node.gtceu.machines/magic_energy_absorber": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", "compass.node.gtceu.machines/miner": "ɹǝuıW", "compass.node.gtceu.machines/mixer": "ɹǝxıW", "compass.node.gtceu.machines/ore_washer": "ɹǝɥsɐM ǝɹO", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 022713a7c3..19bb5b2c5c 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -252,6 +252,7 @@ "block.gtceu.ev_macerator": "§5Advanced Macerator III§r", "block.gtceu.ev_machine_casing": "EV Machine Casing", "block.gtceu.ev_machine_hull": "EV Machine Hull", + "block.gtceu.ev_magic_energy_absorber": "§5Advanced Magic Energy Absorber III§r", "block.gtceu.ev_mixer": "§5Advanced Mixer III§r", "block.gtceu.ev_muffler_hatch": "Muffler Hatch §5EV", "block.gtceu.ev_ore_washer": "§5Advanced Ore Washer III§r", @@ -396,6 +397,7 @@ "block.gtceu.hv_macerator": "§6Advanced Macerator II§r", "block.gtceu.hv_machine_casing": "HV Machine Casing", "block.gtceu.hv_machine_hull": "HV Machine Hull", + "block.gtceu.hv_magic_energy_absorber": "§6Advanced Magic Energy Absorber II§r", "block.gtceu.hv_miner": "§6Advanced Miner II§r", "block.gtceu.hv_mixer": "§6Advanced Mixer II§r", "block.gtceu.hv_muffler_hatch": "Muffler Hatch §6HV", @@ -736,6 +738,7 @@ "block.gtceu.lv_macerator": "Basic Macerator §r", "block.gtceu.lv_machine_casing": "LV Machine Casing", "block.gtceu.lv_machine_hull": "LV Machine Hull", + "block.gtceu.lv_magic_energy_absorber": "Basic Magic Energy Absorber §r", "block.gtceu.lv_miner": "Basic Miner §r", "block.gtceu.lv_mixer": "Basic Mixer §r", "block.gtceu.lv_muffler_hatch": "Muffler Hatch §7LV", @@ -886,6 +889,7 @@ "block.gtceu.mv_macerator": "§bAdvanced Macerator §r", "block.gtceu.mv_machine_casing": "MV Machine Casing", "block.gtceu.mv_machine_hull": "MV Machine Hull", + "block.gtceu.mv_magic_energy_absorber": "§bAdvanced Magic Energy Absorber §r", "block.gtceu.mv_miner": "§bAdvanced Miner §r", "block.gtceu.mv_mixer": "§bAdvanced Mixer §r", "block.gtceu.mv_muffler_hatch": "Muffler Hatch §bMV", @@ -1958,6 +1962,7 @@ "compass.node.gtceu.machines/ld_fluid_pipeline": "Ld Fluid Pipeline", "compass.node.gtceu.machines/ld_item_pipeline": "Ld Item Pipeline", "compass.node.gtceu.machines/macerator": "Macerator", + "compass.node.gtceu.machines/magic_energy_absorber": "Magic Energy Absorber", "compass.node.gtceu.machines/miner": "Miner", "compass.node.gtceu.machines/mixer": "Mixer", "compass.node.gtceu.machines/ore_washer": "Ore Washer", From 2d1c0589e9702060cfe14f3988ec0193236eb9e4 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 11:22:27 +0200 Subject: [PATCH 04/20] magic energy absorber is EV only --- src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index f47e7357ea..12c2ec6ba0 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -573,7 +573,7 @@ public class GTMachines { .tooltips() .compassNode("magic_energy_absorber") .register(), - LV, MV, HV, EV); + EV); ////////////////////////////////////// // ********* Storage *********// From b5eba6c7dc3bc6ab50115d1453958a6223fef87c Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 11:35:20 +0200 Subject: [PATCH 05/20] add recipe and move generator to ev only --- .../gtceu/compass/nodes/machines/magic_energy_absorber.json | 5 +---- src/generated/resources/assets/gtceu/lang/en_ud.json | 3 --- src/generated/resources/assets/gtceu/lang/en_us.json | 3 --- .../java/com/gregtechceu/gtceu/common/data/GTMachines.java | 2 +- .../gtceu/data/recipe/misc/MetaTileEntityLoader.java | 2 ++ 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json index b3c8fbf596..47f52eaba6 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json @@ -1,12 +1,9 @@ { "button_texture": { "type": "item", - "res": "gtceu:lv_magic_energy_absorber" + "res": "gtceu:ev_magic_energy_absorber" }, "items": [ - "gtceu:lv_magic_energy_absorber", - "gtceu:mv_magic_energy_absorber", - "gtceu:hv_magic_energy_absorber", "gtceu:ev_magic_energy_absorber" ], "page": "gtceu:machines/magic_energy_absorber", diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index 0b5d475b0b..b737761af1 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -397,7 +397,6 @@ "block.gtceu.hv_macerator": "ɹ§II ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛH", "block.gtceu.hv_machine_hull": "ןןnH ǝuıɥɔɐW ΛH", - "block.gtceu.hv_magic_energy_absorber": "ɹ§II ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_miner": "ɹ§II ɹǝuıW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_mixer": "ɹ§II ɹǝxıW pǝɔuɐʌpⱯ9§", "block.gtceu.hv_muffler_hatch": "ΛH9§ ɥɔʇɐH ɹǝןɟɟnW", @@ -738,7 +737,6 @@ "block.gtceu.lv_macerator": "ɹ§ ɹoʇɐɹǝɔɐW ɔısɐᗺ", "block.gtceu.lv_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛꞀ", "block.gtceu.lv_machine_hull": "ןןnH ǝuıɥɔɐW ΛꞀ", - "block.gtceu.lv_magic_energy_absorber": "ɹ§ ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW ɔısɐᗺ", "block.gtceu.lv_miner": "ɹ§ ɹǝuıW ɔısɐᗺ", "block.gtceu.lv_mixer": "ɹ§ ɹǝxıW ɔısɐᗺ", "block.gtceu.lv_muffler_hatch": "ΛꞀㄥ§ ɥɔʇɐH ɹǝןɟɟnW", @@ -889,7 +887,6 @@ "block.gtceu.mv_macerator": "ɹ§ ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯq§", "block.gtceu.mv_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛW", "block.gtceu.mv_machine_hull": "ןןnH ǝuıɥɔɐW ΛW", - "block.gtceu.mv_magic_energy_absorber": "ɹ§ ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW pǝɔuɐʌpⱯq§", "block.gtceu.mv_miner": "ɹ§ ɹǝuıW pǝɔuɐʌpⱯq§", "block.gtceu.mv_mixer": "ɹ§ ɹǝxıW pǝɔuɐʌpⱯq§", "block.gtceu.mv_muffler_hatch": "ΛWq§ ɥɔʇɐH ɹǝןɟɟnW", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 19bb5b2c5c..6a80439f07 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -397,7 +397,6 @@ "block.gtceu.hv_macerator": "§6Advanced Macerator II§r", "block.gtceu.hv_machine_casing": "HV Machine Casing", "block.gtceu.hv_machine_hull": "HV Machine Hull", - "block.gtceu.hv_magic_energy_absorber": "§6Advanced Magic Energy Absorber II§r", "block.gtceu.hv_miner": "§6Advanced Miner II§r", "block.gtceu.hv_mixer": "§6Advanced Mixer II§r", "block.gtceu.hv_muffler_hatch": "Muffler Hatch §6HV", @@ -738,7 +737,6 @@ "block.gtceu.lv_macerator": "Basic Macerator §r", "block.gtceu.lv_machine_casing": "LV Machine Casing", "block.gtceu.lv_machine_hull": "LV Machine Hull", - "block.gtceu.lv_magic_energy_absorber": "Basic Magic Energy Absorber §r", "block.gtceu.lv_miner": "Basic Miner §r", "block.gtceu.lv_mixer": "Basic Mixer §r", "block.gtceu.lv_muffler_hatch": "Muffler Hatch §7LV", @@ -889,7 +887,6 @@ "block.gtceu.mv_macerator": "§bAdvanced Macerator §r", "block.gtceu.mv_machine_casing": "MV Machine Casing", "block.gtceu.mv_machine_hull": "MV Machine Hull", - "block.gtceu.mv_magic_energy_absorber": "§bAdvanced Magic Energy Absorber §r", "block.gtceu.mv_miner": "§bAdvanced Miner §r", "block.gtceu.mv_mixer": "§bAdvanced Mixer §r", "block.gtceu.mv_muffler_hatch": "Muffler Hatch §bMV", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 12c2ec6ba0..371a51e7ee 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -571,7 +571,7 @@ public class GTMachines { .renderer(() -> new WorkableTieredHullMachineRenderer(tier, GTCEu.id("block/casings/magic/absorber/active"))) .tooltips() - .compassNode("magic_energy_absorber") + .compassNodeSelf() .register(), EV); diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java index 7c68550b5c..18a20d08f6 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java @@ -837,6 +837,8 @@ public static void init(Consumer provider) { CIRCUIT, 'W', CABLE, 'S', Tags.Items.CHESTS_WOODEN, 'G', GRINDER); registerMachineRecipe(provider, GTMachines.MINER, "MMM", "WHW", "CSC", 'M', MOTOR, 'W', CABLE, 'H', HULL, 'C', CIRCUIT, 'S', SENSOR); + registerMachineRecipe(provider, GTMachines.MAGIC_ENERGY_ABSORBER, "PCP", "PMP", "PCP", 'M', HULL, 'P', SENSOR, + 'C', CIRCUIT); registerMachineRecipe(provider, GTMachines.MUFFLER_HATCH, "HM", "PR", 'H', HULL, 'M', MOTOR, 'P', PIPE_NORMAL, 'R', ROTOR); From 622441bd34da20a5a5e7086d722485b5226fa8e0 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 11:56:50 +0200 Subject: [PATCH 06/20] file organization and data gen --- ..._absorber.json => ev_magic_energy_absorber.json} | 2 +- .../resources/assets/gtceu/lang/en_ud.json | 2 +- .../resources/assets/gtceu/lang/en_us.json | 2 +- .../gregtechceu/gtceu/common/data/GTMachines.java | 2 +- .../magic_energy_absorber/overlay_bottom.png} | Bin .../overlay_bottom_active.png} | Bin .../overlay_bottom_active_emissive.png} | Bin .../overlay_bottom_emissive.png} | Bin .../magic_energy_absorber/overlay_side.png} | Bin .../magic_energy_absorber/overlay_side_active.png} | Bin .../overlay_side_active_emissive.png} | Bin .../overlay_side_emissive.png} | Bin .../magic_energy_absorber/overlay_top.png} | Bin .../magic_energy_absorber/overlay_top_active.png} | Bin .../overlay_top_active_emissive.png} | Bin .../magic_energy_absorber/overlay_top_emissive.png} | Bin 16 files changed, 4 insertions(+), 4 deletions(-) rename src/generated/resources/assets/gtceu/compass/nodes/machines/{magic_energy_absorber.json => ev_magic_energy_absorber.json} (80%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/active/bottom.png => machines/magic_energy_absorber/overlay_bottom.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/normal/bottom.png => machines/magic_energy_absorber/overlay_bottom_active.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/active/bottom_emissive.png => machines/magic_energy_absorber/overlay_bottom_active_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/normal/bottom_emissive.png => machines/magic_energy_absorber/overlay_bottom_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/normal/side.png => machines/magic_energy_absorber/overlay_side.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/active/side.png => machines/magic_energy_absorber/overlay_side_active.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/active/side_emissive.png => machines/magic_energy_absorber/overlay_side_active_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/normal/side_emissive.png => machines/magic_energy_absorber/overlay_side_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/active/top.png => machines/magic_energy_absorber/overlay_top.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/normal/top.png => machines/magic_energy_absorber/overlay_top_active.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/active/top_emissive.png => machines/magic_energy_absorber/overlay_top_active_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/{casings/magic/absorber/normal/top_emissive.png => machines/magic_energy_absorber/overlay_top_emissive.png} (100%) diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json similarity index 80% rename from src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json rename to src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json index 47f52eaba6..3c4914514e 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/magic_energy_absorber.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json @@ -6,7 +6,7 @@ "items": [ "gtceu:ev_magic_energy_absorber" ], - "page": "gtceu:machines/magic_energy_absorber", + "page": "gtceu:machines/ev_magic_energy_absorber", "position": [ -100, 300 diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index b737761af1..a5a4ef4fa9 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -1943,6 +1943,7 @@ "compass.node.gtceu.machines/electric_furnace": "ǝɔɐuɹnℲ ɔıɹʇɔǝןƎ", "compass.node.gtceu.machines/electrolyzer": "ɹǝzʎןoɹʇɔǝןƎ", "compass.node.gtceu.machines/electromagnetic_separator": "ɹoʇɐɹɐdǝS ɔıʇǝubɐɯoɹʇɔǝןƎ", + "compass.node.gtceu.machines/ev_magic_energy_absorber": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW ʌƎ", "compass.node.gtceu.machines/extractor": "ɹoʇɔɐɹʇxƎ", "compass.node.gtceu.machines/extruder": "ɹǝpnɹʇxƎ", "compass.node.gtceu.machines/fermenter": "ɹǝʇuǝɯɹǝℲ", @@ -1959,7 +1960,6 @@ "compass.node.gtceu.machines/ld_fluid_pipeline": "ǝuıןǝdıԀ pınןℲ pꞀ", "compass.node.gtceu.machines/ld_item_pipeline": "ǝuıןǝdıԀ ɯǝʇI pꞀ", "compass.node.gtceu.machines/macerator": "ɹoʇɐɹǝɔɐW", - "compass.node.gtceu.machines/magic_energy_absorber": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", "compass.node.gtceu.machines/miner": "ɹǝuıW", "compass.node.gtceu.machines/mixer": "ɹǝxıW", "compass.node.gtceu.machines/ore_washer": "ɹǝɥsɐM ǝɹO", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 6a80439f07..9ac66458eb 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -1943,6 +1943,7 @@ "compass.node.gtceu.machines/electric_furnace": "Electric Furnace", "compass.node.gtceu.machines/electrolyzer": "Electrolyzer", "compass.node.gtceu.machines/electromagnetic_separator": "Electromagnetic Separator", + "compass.node.gtceu.machines/ev_magic_energy_absorber": "Ev Magic Energy Absorber", "compass.node.gtceu.machines/extractor": "Extractor", "compass.node.gtceu.machines/extruder": "Extruder", "compass.node.gtceu.machines/fermenter": "Fermenter", @@ -1959,7 +1960,6 @@ "compass.node.gtceu.machines/ld_fluid_pipeline": "Ld Fluid Pipeline", "compass.node.gtceu.machines/ld_item_pipeline": "Ld Item Pipeline", "compass.node.gtceu.machines/macerator": "Macerator", - "compass.node.gtceu.machines/magic_energy_absorber": "Magic Energy Absorber", "compass.node.gtceu.machines/miner": "Miner", "compass.node.gtceu.machines/mixer": "Mixer", "compass.node.gtceu.machines/ore_washer": "Ore Washer", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 371a51e7ee..38b56079fc 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -569,7 +569,7 @@ public class GTMachines { .rotationState(RotationState.NONE) .langValue("%s Magic Energy Absorber %s".formatted(VLVH[tier], VLVT[tier])) .renderer(() -> new WorkableTieredHullMachineRenderer(tier, - GTCEu.id("block/casings/magic/absorber/active"))) + GTCEu.id("block/machines/magic_energy_absorber"))) .tooltips() .compassNodeSelf() .register(), diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/bottom.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/bottom.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/bottom.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/bottom.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/bottom_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/bottom_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/bottom_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/bottom_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/side.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/side.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/side.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/side.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/side_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/side_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/side_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/side_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/top.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/top.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/top.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/top.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/top_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/active/top_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/top_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/casings/magic/absorber/normal/top_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_emissive.png From 3aba2e0397354b7aca61559c9280c2667762734f Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 13:58:39 +0200 Subject: [PATCH 07/20] destroy generator when in proximity to ender dragon --- .../electric/MagicEnergyAbsorberMachine.java | 51 +++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index 0a88809791..1dd9981225 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -1,16 +1,19 @@ package com.gregtechceu.gtceu.common.machine.electric; -import com.gregtechceu.gtceu.api.capability.IControllable; +import com.gregtechceu.gtceu.api.capability.IWorkable; import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; import com.gregtechceu.gtceu.api.machine.TickableSubscription; import com.gregtechceu.gtceu.api.machine.TieredEnergyMachine; +import com.gregtechceu.gtceu.utils.GTUtil; import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced; import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.boss.enderdragon.EndCrystal; import net.minecraft.world.entity.boss.enderdragon.EnderDragon; @@ -21,6 +24,8 @@ import net.minecraft.world.level.block.DragonEggBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.levelgen.feature.SpikeFeature; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; @@ -31,7 +36,7 @@ import java.util.ArrayList; import java.util.List; -public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements IControllable { +public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements IWorkable { public static final long BASE_EU_PER_FEATURE = 32; public static final long AMPLIFIER_MULTIPLIER = 4; @@ -39,6 +44,7 @@ public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements I protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder( MagicEnergyAbsorberMachine.class, TieredEnergyMachine.MANAGED_FIELD_HOLDER); + private static final double DRAGON_DISTANCE_THRESHOLD = 5; @DescSynced @Persisted @@ -81,11 +87,15 @@ protected long getMaxInputOutputAmperage() { public void onLoad() { super.onLoad(); if (!isRemote()) { - onServerTickSubscription = this.subscribeServerTick(() -> onServerTick(false)); + updateServerTickSubscription(); onServerTick(true); } } + protected void updateServerTickSubscription() { + onServerTickSubscription = this.subscribeServerTick(onServerTickSubscription, () -> onServerTick(false)); + } + @Override public void onUnload() { super.onUnload(); @@ -158,12 +168,18 @@ else if (beamTarget == null) { }); } + protected void checkDragonProximity(EnderDragon dragon) { + if (getPos().getCenter().distanceTo(dragon.position()) < DRAGON_DISTANCE_THRESHOLD) + this.doExplosion(GTUtil.getExplosionPower(tier)); + } + protected void updateCrystalTargets() { if (getLevel() == null) return; // ender dragon check List dragonsInRange = ((ServerLevel) getLevel()).getDragons(); for (EnderDragon dragon : dragonsInRange) { + checkDragonProximity(dragon); if (dragon.nearestCrystal != null && connectedFeatures.contains(dragon.nearestCrystal.getId())) { dragon.nearestCrystal = null; @@ -171,7 +187,7 @@ protected void updateCrystalTargets() { dragon.hurt(dragon.damageSources().explosion(dragon, dragon), 10.0f); dragon.getPhaseManager().setPhase(EnderDragonPhase.CHARGING_PLAYER); ((DragonChargePlayerPhase) dragon.getPhaseManager().getCurrentPhase()) - .setTarget(getPos().getCenter()); + .setTarget(getPos().below().below().getCenter()); } } } @@ -194,4 +210,31 @@ protected void resetConnectedFeatures() { connectedFeatures.clear(); } + + @Override + @SideOnly(Side.CLIENT) + public void animateTick(RandomSource random) { + if (getLevel() == null || !isActive() || this.hasAmplifier) return; + BlockPos pos = getPos(); + for (int i = 0; i < 4; i++) { + getLevel().addParticle(ParticleTypes.PORTAL, pos.getX(), pos.getY(), pos.getZ(), + (random.nextFloat() - 0.5f) * 0.5f, (random.nextFloat() - 0.5f) * 0.5f, + (random.nextFloat() - 0.5f) * 0.5f); + } + } + + @Override + public int getProgress() { + return 1; + } + + @Override + public int getMaxProgress() { + return 1; + } + + @Override + public boolean isActive() { + return isWorkingEnabled() && !connectedFeatures.isEmpty(); + } } From 09d3be138d71188be6084f299ca0c9287037e38a Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 14:01:25 +0200 Subject: [PATCH 08/20] take only one crystal from any spike --- .../common/machine/electric/MagicEnergyAbsorberMachine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index 1dd9981225..33bd253390 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -152,7 +152,7 @@ protected void updateConnectedFeatures() { .map(spike -> getLevel().getEntitiesOfClass(EndCrystal.class, spike.getTopBoundingBox(), crystal -> crystal.distanceToSqr(getPos().getCenter()) < maxDistance)) .reduce(new ArrayList<>(), (lst, crystalList) -> { - lst.addAll(crystalList); + crystalList.stream().findFirst().ifPresent(lst::add); return lst; }); From 4fb7c2d46e20adca8eeaf0e002d2bd6544d0e6c5 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 14:01:25 +0200 Subject: [PATCH 09/20] take only one crystal from any spike --- .../common/machine/electric/MagicEnergyAbsorberMachine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index 1dd9981225..eab891387a 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -152,7 +152,8 @@ protected void updateConnectedFeatures() { .map(spike -> getLevel().getEntitiesOfClass(EndCrystal.class, spike.getTopBoundingBox(), crystal -> crystal.distanceToSqr(getPos().getCenter()) < maxDistance)) .reduce(new ArrayList<>(), (lst, crystalList) -> { - lst.addAll(crystalList); + if (!crystalList.isEmpty()) + lst.add(crystalList.get(0)); return lst; }); From f5e46055ec2d3eae249a134df3b1b87a77ebc997 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 14:04:36 +0200 Subject: [PATCH 10/20] remove unnecessary voltage and tier in name (since there's only ev) --- src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index b543eaff56..65bb57deb7 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -567,7 +567,7 @@ public class GTMachines { MagicEnergyAbsorberMachine::new, (tier, builder) -> builder .rotationState(RotationState.NONE) - .langValue("%s Magic Energy Absorber %s".formatted(VLVH[tier], VLVT[tier])) + .langValue("Magic Energy Absorber") .renderer(() -> new WorkableTieredHullMachineRenderer(tier, GTCEu.id("block/machines/magic_energy_absorber"))) .tooltips() From 65fc9b0497997f5d37290d41795294ea6c56fc68 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 14:20:38 +0200 Subject: [PATCH 11/20] made the output power and multiplier a parameter --- .../electric/MagicEnergyAbsorberMachine.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index eab891387a..e79a5ed51a 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -33,19 +33,28 @@ import lombok.Setter; import org.jetbrains.annotations.NotNull; +import javax.annotation.ParametersAreNonnullByDefault; import java.util.ArrayList; import java.util.List; +@ParametersAreNonnullByDefault public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements IWorkable { - public static final long BASE_EU_PER_FEATURE = 32; - public static final long AMPLIFIER_MULTIPLIER = 4; - protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder( MagicEnergyAbsorberMachine.class, TieredEnergyMachine.MANAGED_FIELD_HOLDER); private static final double DRAGON_DISTANCE_THRESHOLD = 5; + @DescSynced + @Persisted + @Getter + @Setter + protected long baseEUPerFeature; + @DescSynced + @Persisted + @Getter + @Setter + protected long amplifierMultiplier; @DescSynced @Persisted @Getter @@ -63,7 +72,13 @@ public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements I protected TickableSubscription onServerTickSubscription; public MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, Object... args) { + this(holder, tier, 32, 4, args); + } + + protected MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, long baseEUPerFeature, long amplifierMultiplier, Object... args) { super(holder, tier, args); + this.baseEUPerFeature = baseEUPerFeature; + this.amplifierMultiplier = amplifierMultiplier; this.isWorkingEnabled = true; this.connectedFeatures = new IntArrayList(); } @@ -120,7 +135,7 @@ protected void onServerTick(boolean force) { if (connectedFeatures.isEmpty()) return; - long energyPer = BASE_EU_PER_FEATURE * (hasAmplifier ? AMPLIFIER_MULTIPLIER : 1); + long energyPer = this.baseEUPerFeature * (hasAmplifier ? this.amplifierMultiplier : 1); long energyGenerated = 0; // double check end crystals for (int i = 0; i < connectedFeatures.size(); i++) { From be413f23cb672fab7f92d8c2651f39d304006459 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sun, 17 Nov 2024 17:00:36 +0200 Subject: [PATCH 12/20] rendering and data gen --- .../resources/assets/gtceu/lang/en_ud.json | 10 +++++++++- .../resources/assets/gtceu/lang/en_us.json | 10 +++++++++- .../gregtechceu/gtceu/common/data/GTMachines.java | 12 +++++++++--- .../electric/MagicEnergyAbsorberMachine.java | 8 +++++--- .../gregtechceu/gtceu/data/lang/MachineLang.java | 5 +++++ .../{ => active}/overlay_bottom.png | Bin .../overlay_bottom_emissive.png} | Bin .../overlay_side.png} | Bin .../overlay_side_emissive.png} | Bin .../{ => active}/overlay_top.png | Bin .../{ => active}/overlay_top_emissive.png | Bin .../bottom.png} | Bin .../bottom_emissive.png} | Bin .../{overlay_side.png => normal/side.png} | Bin .../side_emissive.png} | Bin .../{overlay_top_active.png => normal/top.png} | Bin .../top_emissive.png} | Bin 17 files changed, 37 insertions(+), 8 deletions(-) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{ => active}/overlay_bottom.png (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_bottom_active_emissive.png => active/overlay_bottom_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_side_active.png => active/overlay_side.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_side_active_emissive.png => active/overlay_side_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{ => active}/overlay_top.png (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{ => active}/overlay_top_emissive.png (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_bottom_active.png => normal/bottom.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_bottom_emissive.png => normal/bottom_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_side.png => normal/side.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_side_emissive.png => normal/side_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_top_active.png => normal/top.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{overlay_top_active_emissive.png => normal/top_emissive.png} (100%) diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index 7fe072db59..03f688b587 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -252,7 +252,7 @@ "block.gtceu.ev_macerator": "ɹ§III ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛƎ", "block.gtceu.ev_machine_hull": "ןןnH ǝuıɥɔɐW ΛƎ", - "block.gtceu.ev_magic_energy_absorber": "ɹ§III ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW pǝɔuɐʌpⱯϛ§", + "block.gtceu.ev_magic_energy_absorber": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", "block.gtceu.ev_mixer": "ɹ§III ɹǝxıW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_muffler_hatch": "ΛƎϛ§ ɥɔʇɐH ɹǝןɟɟnW", "block.gtceu.ev_ore_washer": "ɹ§III ɹǝɥsɐM ǝɹO pǝɔuɐʌpⱯϛ§", @@ -3347,6 +3347,14 @@ "gtceu.machine.machine_hatch.locked": "pǝʞɔoꞀ ǝɔɐɟɹǝʇuI ǝuıɥɔɐW", "gtceu.machine.machine_hatch.processing_array": "ʎɐɹɹⱯ buıssǝɔoɹԀǝ§ ǝɥʇ uı ʞɹoʍ ʇɐɥʇ sǝuıɥɔɐɯ spןoɥ ʎןuo 'ㄥ§ʎɐɹɹⱯ buıssǝɔoɹԀǝ§ ǝɥʇ uı uǝɥM", "gtceu.machine.machine_hatch.tooltip": "sɯǝʇı pıןɐʌ spןoɥ ʎןuo ʇɐɥʇ snᗺ ssǝɔɔⱯ pǝzıןɐıɔǝdS", + "gtceu.machine.magic_energy_absorber.name": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", + "gtceu.machine.magic_energy_absorber.tooltip.0": ")ㄥ§ΛƎϛ§(ㄥ§ 8ㄣ0ᄅɐ§ :⟘∩O ǝbɐʇןoΛ xɐW", + "gtceu.machine.magic_energy_absorber.tooltip.1": "˙sʞɔoןq ㄣ9 uıɥʇıʍ puƎ ǝɥʇ uı sɹɐןןıd uɐıpısqo pǝʇɐɹǝuǝb ʎןןɐɹnʇɐu uo sןɐʇsʎɹɔ puǝ ɯoɹɟ ʎbɹǝuǝ sʇɔǝןןoƆ", + "gtceu.machine.magic_energy_absorber.tooltip.2": "ʇndʇno oʇ ʇ/∩Ǝ ᄅƐ sppɐ ןɐʇsʎɹɔ ɹǝpuǝ ɥɔɐƎ", + "gtceu.machine.magic_energy_absorber.tooltip.3": "ʇndʇno ʎɟıןdɯɐ oʇ doʇ uo bbƎ uobɐɹᗡ ǝɔɐןԀ", + "gtceu.machine.magic_energy_absorber.tooltip.4": "", + "gtceu.machine.magic_energy_absorber.tooltip.5": ":pǝıɟıןdɯɐ uǝɥM", + "gtceu.machine.magic_energy_absorber.tooltip.6": "ʇ/∩Ǝ 8ᄅƖ sppɐ ןɐʇsʎɹɔ ɹǝpuǝ ɥɔɐƎ", "gtceu.machine.maintenance_hatch.tooltip": "sʞɔoןqıʇןnW buıuıɐʇuıɐɯ ɹoℲ", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.0": "¡buıuɐǝןƆ ɥʇıʍ sʞɔoןqıʇןnW buıuıɐʇuıɐɯ ʎןןɐɔıʇɐɯoʇnɐ ɹoℲ", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.1": ":sɐ suɐǝןƆ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index c06c93e702..d322ad7b04 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -252,7 +252,7 @@ "block.gtceu.ev_macerator": "§5Advanced Macerator III§r", "block.gtceu.ev_machine_casing": "EV Machine Casing", "block.gtceu.ev_machine_hull": "EV Machine Hull", - "block.gtceu.ev_magic_energy_absorber": "§5Advanced Magic Energy Absorber III§r", + "block.gtceu.ev_magic_energy_absorber": "Magic Energy Absorber", "block.gtceu.ev_mixer": "§5Advanced Mixer III§r", "block.gtceu.ev_muffler_hatch": "Muffler Hatch §5EV", "block.gtceu.ev_ore_washer": "§5Advanced Ore Washer III§r", @@ -3347,6 +3347,14 @@ "gtceu.machine.machine_hatch.locked": "Machine Interface Locked", "gtceu.machine.machine_hatch.processing_array": "When in the §eProcessing Array§7, only holds machines that work in the §eProcessing Array", "gtceu.machine.machine_hatch.tooltip": "Specialized Access Bus that only holds valid items", + "gtceu.machine.magic_energy_absorber.name": "Magic Energy Absorber", + "gtceu.machine.magic_energy_absorber.tooltip.0": "Max Voltage OUT: §a2048 §7(§5EV§7)", + "gtceu.machine.magic_energy_absorber.tooltip.1": "Collects energy from end crystals on naturally generated obsidian pillars in the End within 64 blocks.", + "gtceu.machine.magic_energy_absorber.tooltip.2": "Each ender crystal adds 32 EU/t to output", + "gtceu.machine.magic_energy_absorber.tooltip.3": "Place Dragon Egg on top to amplify output", + "gtceu.machine.magic_energy_absorber.tooltip.4": "", + "gtceu.machine.magic_energy_absorber.tooltip.5": "When amplified:", + "gtceu.machine.magic_energy_absorber.tooltip.6": "Each ender crystal adds 128 EU/t", "gtceu.machine.maintenance_hatch.tooltip": "For maintaining Multiblocks", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.0": "For automatically maintaining Multiblocks with Cleaning!", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.1": "Cleans as:", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 65bb57deb7..50c1bce0da 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -568,9 +568,15 @@ public class GTMachines { (tier, builder) -> builder .rotationState(RotationState.NONE) .langValue("Magic Energy Absorber") - .renderer(() -> new WorkableTieredHullMachineRenderer(tier, - GTCEu.id("block/machines/magic_energy_absorber"))) - .tooltips() + .sidedWorkableCasingRenderer("block/machines/magic_energy_absorber/normal", + GTCEu.id("block/machines/magic_energy_absorber/active")) + .tooltips(LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 0), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 1), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 2), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 3), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 4), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 5), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 6)) .compassNodeSelf() .register(), EV); diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index e79a5ed51a..a864b9974c 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -33,10 +33,11 @@ import lombok.Setter; import org.jetbrains.annotations.NotNull; -import javax.annotation.ParametersAreNonnullByDefault; import java.util.ArrayList; import java.util.List; +import javax.annotation.ParametersAreNonnullByDefault; + @ParametersAreNonnullByDefault public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements IWorkable { @@ -74,8 +75,9 @@ public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements I public MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, Object... args) { this(holder, tier, 32, 4, args); } - - protected MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, long baseEUPerFeature, long amplifierMultiplier, Object... args) { + + protected MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, long baseEUPerFeature, + long amplifierMultiplier, Object... args) { super(holder, tier, args); this.baseEUPerFeature = baseEUPerFeature; this.amplifierMultiplier = amplifierMultiplier; diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java b/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java index 1d27cc37fa..416f3ff63c 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java @@ -401,6 +401,11 @@ protected static void init(RegistrateLangProvider provider) { provider.add("gtceu.machine.world_accelerator.mode_tile", "Block Entity Mode"); provider.add("gtceu.machine.world_accelerator.mode_entity", "Random Tick Mode"); + // magic energy absorber + provider.add("gtceu.machine.magic_energy_absorber.name", "Magic Energy Absorber"); + multilineLang(provider, "gtceu.machine.magic_energy_absorber.tooltip", + "Max Voltage OUT: §a2048 §7(§5EV§7)\nCollects energy from end crystals on naturally generated obsidian pillars in the End within 64 blocks.\nEach ender crystal adds 32 EU/t to output\nPlace Dragon Egg on top to amplify output\n\nWhen amplified:\nEach ender crystal adds 128 EU/t"); + // Scanner provider.add("gtceu.scanner.copy_stick_from", "§oStick to Copy"); provider.add("gtceu.scanner.copy_stick_empty", "§oEmpty Stick"); diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_top.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_top.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_top_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_top_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/top.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/top.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/top_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_top_active_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/top_emissive.png From ce2b0fffdd0d0f15ea56a58e955adfaac32c46db Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Tue, 19 Nov 2024 03:01:45 +0200 Subject: [PATCH 13/20] okay, figure out the format --- .../{normal/side.png => overlay_back.png} | Bin .../overlay_side.png => overlay_back_active.png} | Bin ...ssive.png => overlay_back_active_emissive.png} | Bin ...ide_emissive.png => overlay_back_emissive.png} | Bin .../{active => }/overlay_bottom.png | Bin .../bottom.png => overlay_bottom_active.png} | Bin ...ive.png => overlay_bottom_active_emissive.png} | Bin ...m_emissive.png => overlay_bottom_emissive.png} | Bin .../magic_energy_absorber/overlay_front.png | Bin 0 -> 324 bytes .../overlay_front_active.png | Bin 0 -> 323 bytes .../overlay_front_active_emissive.png | Bin 0 -> 166 bytes .../overlay_front_emissive.png | Bin 0 -> 159 bytes .../magic_energy_absorber/overlay_side.png | Bin 0 -> 324 bytes .../magic_energy_absorber/overlay_side_active.png | Bin 0 -> 323 bytes .../overlay_side_active_emissive.png | Bin 0 -> 166 bytes .../overlay_side_emissive.png | Bin 0 -> 159 bytes .../{active => }/overlay_top.png | Bin .../{normal/top.png => overlay_top_active.png} | Bin ...issive.png => overlay_top_active_emissive.png} | Bin .../top_emissive.png => overlay_top_emissive.png} | Bin 20 files changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{normal/side.png => overlay_back.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{active/overlay_side.png => overlay_back_active.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{active/overlay_side_emissive.png => overlay_back_active_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{normal/side_emissive.png => overlay_back_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{active => }/overlay_bottom.png (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{normal/bottom.png => overlay_bottom_active.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{active/overlay_bottom_emissive.png => overlay_bottom_active_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{normal/bottom_emissive.png => overlay_bottom_emissive.png} (100%) create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_active.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_active_emissive.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_emissive.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png create mode 100644 src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{active => }/overlay_top.png (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{normal/top.png => overlay_top_active.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{active/overlay_top_emissive.png => overlay_top_active_emissive.png} (100%) rename src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/{normal/top_emissive.png => overlay_top_emissive.png} (100%) diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back_active.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back_active.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back_active_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_side_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back_active_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/side_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_back_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/active/overlay_bottom_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_active_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_emissive.png similarity index 100% rename from src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/normal/bottom_emissive.png rename to src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_bottom_emissive.png diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front.png new file mode 100644 index 0000000000000000000000000000000000000000..94b136274ba80d0438067e5794c58ae1d4785d89 GIT binary patch literal 324 zcmV-K0lWT*P)s^bL20W8OI$5nQ<+bfp7K5~z*ytM6(?+>(*eb)k=+|7%K%MBM;M;}^IaV@j=h9n<}a3xfSz{< z^~p3NFa$|%KMB-J2}siIvn_!hT`uG6mG~r&7W~xeScxM5rAC2Bt|JCneAE+vqrn3~ zbL6&D^t9%SpD^NB3wkfMlvl+n8`GJUzWZTzX?q7HdM4Wc4M*Urey7s(%Z-*JeB?J% WVFJBZNT0qm(xUDD2_Doq7Ud0VBuqjPJFtom{?9e9Llt zo%teMETh%BzfG~;W-G5iakSn5aD+JBef}RI6!UH|hq`wJrSXIP!N}H)E8Y==5RKRx zCcC{lphw;l$aR-1Cdq0rg_O9?U8E;8Ck%C5`};90@$Jt{lkXqaI&R26qJY zk=ahs)1J<1al*9{^`2}gtBO@NC%=}e_G3S^{Raj5O_cv0j=+_Ju+$2^nr%mT%Pup+ VB7KxTm?QuI002ovPDHLkV1lnskQ@L2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_active_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_active_emissive.png new file mode 100644 index 0000000000000000000000000000000000000000..cbe43d8712ee4dce7f1d5cebd4131e748caeba5d GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL2FMJ#}EtuWC_-0$v^Ily#E&-l4ub0N@kc~ z#@6Phk#EPW{MdO-*31PaUl~u_{Qv*-VZ)FL5gw-l2N)PCUn;q&o;bG?Xbgj=tDnm{ Hr-UW|PVzAx literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_front_emissive.png new file mode 100644 index 0000000000000000000000000000000000000000..1dafef6832fb8c52baebd4012e7da805b34c09d6 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucK@(3G#}EtuWC_-0$v^H)ybe5~#~6A7q?j8_ z%$#oWDl|s^bL20W8OI$5nQ<+bfp7K5~z*ytM6(?+>(*eb)k=+|7%K%MBM;M;}^IaV@j=h9n<}a3xfSz{< z^~p3NFa$|%KMB-J2}siIvn_!hT`uG6mG~r&7W~xeScxM5rAC2Bt|JCneAE+vqrn3~ zbL6&D^t9%SpD^NB3wkfMlvl+n8`GJUzWZTzX?q7HdM4Wc4M*Urey7s(%Z-*JeB?J% WVFJBZNT0qm(xUDD2_Doq7Ud0VBuqjPJFtom{?9e9Llt zo%teMETh%BzfG~;W-G5iakSn5aD+JBef}RI6!UH|hq`wJrSXIP!N}H)E8Y==5RKRx zCcC{lphw;l$aR-1Cdq0rg_O9?U8E;8Ck%C5`};90@$Jt{lkXqaI&R26qJY zk=ahs)1J<1al*9{^`2}gtBO@NC%=}e_G3S^{Raj5O_cv0j=+_Ju+$2^nr%mT%Pup+ VB7KxTm?QuI002ovPDHLkV1lnskQ@L2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_active_emissive.png new file mode 100644 index 0000000000000000000000000000000000000000..cbe43d8712ee4dce7f1d5cebd4131e748caeba5d GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL2FMJ#}EtuWC_-0$v^Ily#E&-l4ub0N@kc~ z#@6Phk#EPW{MdO-*31PaUl~u_{Qv*-VZ)FL5gw-l2N)PCUn;q&o;bG?Xbgj=tDnm{ Hr-UW|PVzAx literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png b/src/main/resources/assets/gtceu/textures/block/machines/magic_energy_absorber/overlay_side_emissive.png new file mode 100644 index 0000000000000000000000000000000000000000..1dafef6832fb8c52baebd4012e7da805b34c09d6 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucK@(3G#}EtuWC_-0$v^H)ybe5~#~6A7q?j8_ z%$#oWDl| Date: Tue, 19 Nov 2024 03:02:00 +0200 Subject: [PATCH 14/20] switched renderer --- .../java/com/gregtechceu/gtceu/common/data/GTMachines.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 50c1bce0da..dac6e94030 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -568,8 +568,7 @@ public class GTMachines { (tier, builder) -> builder .rotationState(RotationState.NONE) .langValue("Magic Energy Absorber") - .sidedWorkableCasingRenderer("block/machines/magic_energy_absorber/normal", - GTCEu.id("block/machines/magic_energy_absorber/active")) + .workableTieredHullRenderer(GTCEu.id("block/machines/magic_energy_absorber")) .tooltips(LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 0), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 1), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 2), From 7146ea1ee577c7bc6500c53a0411ba014ad57db8 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Tue, 19 Nov 2024 03:02:17 +0200 Subject: [PATCH 15/20] added rerender member --- .../electric/MagicEnergyAbsorberMachine.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index a864b9974c..485102734d 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -8,6 +8,7 @@ import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced; import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; +import com.lowdragmc.lowdraglib.syncdata.annotation.RequireRerender; import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; import net.minecraft.core.BlockPos; @@ -60,14 +61,12 @@ public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements I @Persisted @Getter @Setter - protected boolean isWorkingEnabled; - @DescSynced - @Persisted - @Getter - @Setter protected boolean hasAmplifier; @Getter protected IntList connectedFeatures; + @DescSynced + @RequireRerender + protected int numFeatures; // subscriptions protected TickableSubscription onServerTickSubscription; @@ -81,7 +80,6 @@ protected MagicEnergyAbsorberMachine(IMachineBlockEntity holder, int tier, long super(holder, tier, args); this.baseEUPerFeature = baseEUPerFeature; this.amplifierMultiplier = amplifierMultiplier; - this.isWorkingEnabled = true; this.connectedFeatures = new IntArrayList(); } @@ -184,6 +182,7 @@ else if (beamTarget == null) { this.connectedFeatures.add(endCrystal.getId()); } }); + numFeatures = this.connectedFeatures.size(); } protected void checkDragonProximity(EnderDragon dragon) { @@ -253,6 +252,14 @@ public int getMaxProgress() { @Override public boolean isActive() { - return isWorkingEnabled() && !connectedFeatures.isEmpty(); + return numFeatures > 0; } + + @Override + public boolean isWorkingEnabled() { + return true; + } + + @Override + public void setWorkingEnabled(boolean isWorkingAllowed) {} } From e3ec91591c2113c2d98b94273a4f193c447640ac Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Tue, 19 Nov 2024 03:02:32 +0200 Subject: [PATCH 16/20] reduced amps to max 1 --- .../common/machine/electric/MagicEnergyAbsorberMachine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index 485102734d..0df954eb1c 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -95,7 +95,7 @@ protected boolean isEnergyEmitter() { @Override protected long getMaxInputOutputAmperage() { - return 4; + return 1; } @Override From 24a581b0dbc6ff4c73778c5c1812577240d132df Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Sat, 30 Nov 2024 01:05:07 +0200 Subject: [PATCH 17/20] made disabling the machine possible dropped syncing multiple values better code formatting --- .../electric/MagicEnergyAbsorberMachine.java | 68 +++++++++++-------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java index 0df954eb1c..0de7289d5f 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/MagicEnergyAbsorberMachine.java @@ -47,17 +47,14 @@ public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements I TieredEnergyMachine.MANAGED_FIELD_HOLDER); private static final double DRAGON_DISTANCE_THRESHOLD = 5; - @DescSynced @Persisted @Getter @Setter protected long baseEUPerFeature; - @DescSynced @Persisted @Getter @Setter protected long amplifierMultiplier; - @DescSynced @Persisted @Getter @Setter @@ -67,6 +64,12 @@ public class MagicEnergyAbsorberMachine extends TieredEnergyMachine implements I @DescSynced @RequireRerender protected int numFeatures; + @Getter + @Setter + @Persisted + @DescSynced + @RequireRerender + protected boolean workingEnabled = true; // subscriptions protected TickableSubscription onServerTickSubscription; @@ -122,18 +125,26 @@ public void onUnload() { } protected void onServerTick(boolean force) { - if (!(getLevel() instanceof ServerLevel serverLevel) || serverLevel.dimension() != Level.END) return; + if (!workingEnabled || !(getLevel() instanceof ServerLevel serverLevel) || + serverLevel.dimension() != Level.END) { + return; + } - if (force || getOffsetTimer() % 20 == 0) + if (force || getOffsetTimer() % 20 == 0) { updateAmplifierStatus(); + } - if (force || getOffsetTimer() % 200 == 0) + if (force || getOffsetTimer() % 200 == 0) { updateConnectedFeatures(); + } - if (force || !serverLevel.getDragons().isEmpty()) + if (force || !serverLevel.getDragons().isEmpty()) { updateCrystalTargets(); + } - if (connectedFeatures.isEmpty()) return; + if (connectedFeatures.isEmpty()) { + return; + } long energyPer = this.baseEUPerFeature * (hasAmplifier ? this.amplifierMultiplier : 1); long energyGenerated = 0; @@ -143,8 +154,9 @@ protected void onServerTick(boolean force) { energyGenerated += energyPer; } - if (energyGenerated > 0) + if (energyGenerated > 0) { energyContainer.changeEnergy(energyGenerated); + } } protected void updateAmplifierStatus() { @@ -159,7 +171,9 @@ protected void updateAmplifierStatus() { protected void updateConnectedFeatures() { this.connectedFeatures.clear(); - if (getLevel() == null) return; + if (getLevel() == null) { + return; + } // get all natural end crystals final double maxDistance = 4096; // (64^2) @@ -175,9 +189,9 @@ protected void updateConnectedFeatures() { // set end crystals beam target to this generator endCrystals.forEach(endCrystal -> { BlockPos beamTarget = endCrystal.getBeamTarget(); - if (getPos().equals(beamTarget)) + if (getPos().equals(beamTarget)) { this.connectedFeatures.add(endCrystal.getId()); - else if (beamTarget == null) { + } else if (beamTarget == null) { endCrystal.setBeamTarget(getPos()); this.connectedFeatures.add(endCrystal.getId()); } @@ -186,12 +200,15 @@ else if (beamTarget == null) { } protected void checkDragonProximity(EnderDragon dragon) { - if (getPos().getCenter().distanceTo(dragon.position()) < DRAGON_DISTANCE_THRESHOLD) + if (getPos().getCenter().distanceTo(dragon.position()) < DRAGON_DISTANCE_THRESHOLD) { this.doExplosion(GTUtil.getExplosionPower(tier)); + } } protected void updateCrystalTargets() { - if (getLevel() == null) return; + if (getLevel() == null) { + return; + } // ender dragon check List dragonsInRange = ((ServerLevel) getLevel()).getDragons(); @@ -204,7 +221,7 @@ protected void updateCrystalTargets() { dragon.hurt(dragon.damageSources().explosion(dragon, dragon), 10.0f); dragon.getPhaseManager().setPhase(EnderDragonPhase.CHARGING_PLAYER); ((DragonChargePlayerPhase) dragon.getPhaseManager().getCurrentPhase()) - .setTarget(getPos().below().below().getCenter()); + .setTarget(getPos().below(2).getCenter()); } } } @@ -219,10 +236,13 @@ protected void resetConnectedFeatures() { for (int id : connectedFeatures) { Entity entity = getLevel().getEntity(id); - if (!(entity instanceof EndCrystal endCrystal)) continue; + if (!(entity instanceof EndCrystal endCrystal)) { + continue; + } - if (getPos().equals(endCrystal.getBeamTarget())) + if (getPos().equals(endCrystal.getBeamTarget())) { endCrystal.setBeamTarget(null); + } } connectedFeatures.clear(); @@ -231,7 +251,9 @@ protected void resetConnectedFeatures() { @Override @SideOnly(Side.CLIENT) public void animateTick(RandomSource random) { - if (getLevel() == null || !isActive() || this.hasAmplifier) return; + if (getLevel() == null || !isActive() || this.hasAmplifier) { + return; + } BlockPos pos = getPos(); for (int i = 0; i < 4; i++) { getLevel().addParticle(ParticleTypes.PORTAL, pos.getX(), pos.getY(), pos.getZ(), @@ -252,14 +274,6 @@ public int getMaxProgress() { @Override public boolean isActive() { - return numFeatures > 0; - } - - @Override - public boolean isWorkingEnabled() { - return true; + return isWorkingEnabled() && numFeatures > 0; } - - @Override - public void setWorkingEnabled(boolean isWorkingAllowed) {} } From b95893c2537e01515c5e0b5825843641aa140513 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Wed, 11 Dec 2024 21:26:57 +0200 Subject: [PATCH 18/20] tooltip lang --- src/generated/resources/assets/gtceu/lang/en_ud.json | 12 ++++++------ src/generated/resources/assets/gtceu/lang/en_us.json | 12 ++++++------ .../gregtechceu/gtceu/common/data/GTMachines.java | 4 +++- .../com/gregtechceu/gtceu/data/lang/MachineLang.java | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index e269c9a980..6565a8d2f2 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -3353,13 +3353,13 @@ "gtceu.machine.machine_hatch.processing_array": "ʎɐɹɹⱯ buıssǝɔoɹԀǝ§ ǝɥʇ uı ʞɹoʍ ʇɐɥʇ sǝuıɥɔɐɯ spןoɥ ʎןuo 'ㄥ§ʎɐɹɹⱯ buıssǝɔoɹԀǝ§ ǝɥʇ uı uǝɥM", "gtceu.machine.machine_hatch.tooltip": "sɯǝʇı pıןɐʌ spןoɥ ʎןuo ʇɐɥʇ snᗺ ssǝɔɔⱯ pǝzıןɐıɔǝdS", "gtceu.machine.magic_energy_absorber.name": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", - "gtceu.machine.magic_energy_absorber.tooltip.0": ")ㄥ§ΛƎϛ§(ㄥ§ 8ㄣ0ᄅɐ§ :⟘∩O ǝbɐʇןoΛ xɐW", - "gtceu.machine.magic_energy_absorber.tooltip.1": "˙sʞɔoןq ㄣ9 uıɥʇıʍ puƎ ǝɥʇ uı sɹɐןןıd uɐıpısqo pǝʇɐɹǝuǝb ʎןןɐɹnʇɐu uo sןɐʇsʎɹɔ puǝ ɯoɹɟ ʎbɹǝuǝ sʇɔǝןןoƆ", - "gtceu.machine.magic_energy_absorber.tooltip.2": "ʇndʇno oʇ ʇ/∩Ǝ ᄅƐ sppɐ ןɐʇsʎɹɔ ɹǝpuǝ ɥɔɐƎ", - "gtceu.machine.magic_energy_absorber.tooltip.3": "ʇndʇno ʎɟıןdɯɐ oʇ doʇ uo bbƎ uobɐɹᗡ ǝɔɐןԀ", + "gtceu.machine.magic_energy_absorber.tooltip.0": "", + "gtceu.machine.magic_energy_absorber.tooltip.1": "˙sʞɔoןq ㄥ§ㄣ9ɹ§ uıɥʇıʍ puƎ ǝɥʇ uı sɹɐןןıd uɐıpısqo pǝʇɐɹǝuǝb ʎןןɐɹnʇɐu uoㄥ§ ɹ§sןɐʇsʎɹƆ puƎq§ ɯoɹɟ ʎbɹǝuǝ sʇɔǝןןoƆㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.2": "ʇndʇno oʇ ㄥ§ʇ/∩Ǝ ᄅƐɹ§ sppɐㄥ§ ɹ§ןɐʇsʎɹƆ puƎq§ ɥɔɐƎㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.3": "ʇndʇno ʎɟıןdɯɐ oʇ doʇ uoㄥ§ ɹ§bbƎ uobɐɹᗡp§ ǝɔɐןԀㄥ§", "gtceu.machine.magic_energy_absorber.tooltip.4": "", - "gtceu.machine.magic_energy_absorber.tooltip.5": ":pǝıɟıןdɯɐ uǝɥM", - "gtceu.machine.magic_energy_absorber.tooltip.6": "ʇ/∩Ǝ 8ᄅƖ sppɐ ןɐʇsʎɹɔ ɹǝpuǝ ɥɔɐƎ", + "gtceu.machine.magic_energy_absorber.tooltip.5": ":pǝıɟıןdɯɐ uǝɥMㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.6": "ʇ/∩Ǝ 8ᄅƖɹ§ sppɐㄥ§ ɹ§ןɐʇsʎɹƆ puƎq§ ɥɔɐƎㄥ§", "gtceu.machine.maintenance_hatch.tooltip": "sʞɔoןqıʇןnW buıuıɐʇuıɐɯ ɹoℲ", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.0": "¡buıuɐǝןƆ ɥʇıʍ sʞɔoןqıʇןnW buıuıɐʇuıɐɯ ʎןןɐɔıʇɐɯoʇnɐ ɹoℲ", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.1": ":sɐ suɐǝןƆ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 77b054e7c1..f232a4f729 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -3353,13 +3353,13 @@ "gtceu.machine.machine_hatch.processing_array": "When in the §eProcessing Array§7, only holds machines that work in the §eProcessing Array", "gtceu.machine.machine_hatch.tooltip": "Specialized Access Bus that only holds valid items", "gtceu.machine.magic_energy_absorber.name": "Magic Energy Absorber", - "gtceu.machine.magic_energy_absorber.tooltip.0": "Max Voltage OUT: §a2048 §7(§5EV§7)", - "gtceu.machine.magic_energy_absorber.tooltip.1": "Collects energy from end crystals on naturally generated obsidian pillars in the End within 64 blocks.", - "gtceu.machine.magic_energy_absorber.tooltip.2": "Each ender crystal adds 32 EU/t to output", - "gtceu.machine.magic_energy_absorber.tooltip.3": "Place Dragon Egg on top to amplify output", + "gtceu.machine.magic_energy_absorber.tooltip.0": "", + "gtceu.machine.magic_energy_absorber.tooltip.1": "§7Collects energy from §bEnd Crystals§r §7on naturally generated obsidian pillars in the End within §r64§7 blocks.", + "gtceu.machine.magic_energy_absorber.tooltip.2": "§7Each §bEnd Crystal§r §7adds §r32 EU/t§7 to output", + "gtceu.machine.magic_energy_absorber.tooltip.3": "§7Place §dDragon Egg§r §7on top to amplify output", "gtceu.machine.magic_energy_absorber.tooltip.4": "", - "gtceu.machine.magic_energy_absorber.tooltip.5": "When amplified:", - "gtceu.machine.magic_energy_absorber.tooltip.6": "Each ender crystal adds 128 EU/t", + "gtceu.machine.magic_energy_absorber.tooltip.5": "§7When amplified:", + "gtceu.machine.magic_energy_absorber.tooltip.6": "§7Each §bEnd Crystal§r §7adds §r128 EU/t", "gtceu.machine.maintenance_hatch.tooltip": "For maintaining Multiblocks", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.0": "For automatically maintaining Multiblocks with Cleaning!", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.1": "Cleans as:", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 46483a8e68..63bc3a79e9 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -569,7 +569,9 @@ public class GTMachines { .rotationState(RotationState.NONE) .langValue("Magic Energy Absorber") .workableTieredHullRenderer(GTCEu.id("block/machines/magic_energy_absorber")) - .tooltips(LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 0), + .tooltips(Component.translatable("gtceu.universal.tooltip.voltage_out", + FormattingUtil.formatNumbers(GTValues.V[tier]), GTValues.VNF[tier]), + LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 0), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 1), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 2), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 3), diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java b/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java index a8f54150e3..b6abfabead 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java @@ -408,7 +408,7 @@ protected static void init(RegistrateLangProvider provider) { // magic energy absorber provider.add("gtceu.machine.magic_energy_absorber.name", "Magic Energy Absorber"); multilineLang(provider, "gtceu.machine.magic_energy_absorber.tooltip", - "Max Voltage OUT: §a2048 §7(§5EV§7)\nCollects energy from end crystals on naturally generated obsidian pillars in the End within 64 blocks.\nEach ender crystal adds 32 EU/t to output\nPlace Dragon Egg on top to amplify output\n\nWhen amplified:\nEach ender crystal adds 128 EU/t"); + "\n§7Collects energy from §bEnd Crystals§r §7on naturally generated obsidian pillars in the End within §r64§7 blocks.\n§7Each §bEnd Crystal§r §7adds §r32 EU/t§7 to output\n§7Place §dDragon Egg§r §7on top to amplify output\n\n§7When amplified:\n§7Each §bEnd Crystal§r §7adds §r128 EU/t"); // Scanner provider.add("gtceu.scanner.copy_stick_from", "§oStick to Copy"); From b0a19d044817f218b1a823583198749f57dc1439 Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Wed, 11 Dec 2024 21:37:18 +0200 Subject: [PATCH 19/20] compass is kil --- .../nodes/machines/ev_magic_energy_absorber.json | 15 --------------- .../gregtechceu/gtceu/common/data/GTMachines.java | 1 - 2 files changed, 16 deletions(-) delete mode 100644 src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json diff --git a/src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json b/src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json deleted file mode 100644 index 3c4914514e..0000000000 --- a/src/generated/resources/assets/gtceu/compass/nodes/machines/ev_magic_energy_absorber.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "button_texture": { - "type": "item", - "res": "gtceu:ev_magic_energy_absorber" - }, - "items": [ - "gtceu:ev_magic_energy_absorber" - ], - "page": "gtceu:machines/ev_magic_energy_absorber", - "position": [ - -100, - 300 - ], - "section": "gtceu:machines" -} \ No newline at end of file diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index f7cedddc78..6b05c9fe35 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -566,7 +566,6 @@ public class GTMachines { LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 4), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 5), LangHandler.getFromMultiLang("gtceu.machine.magic_energy_absorber.tooltip", 6)) - .compassNodeSelf() .register(), EV); From 4beca340bbbe68dd19ee408ab80ec2e952a5c09b Mon Sep 17 00:00:00 2001 From: omergunr100 Date: Wed, 11 Dec 2024 21:39:33 +0200 Subject: [PATCH 20/20] run data --- src/generated/resources/assets/gtceu/lang/en_ud.json | 9 +++++++++ src/generated/resources/assets/gtceu/lang/en_us.json | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index 4a42d3925e..5ccb17b889 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -258,6 +258,7 @@ "block.gtceu.ev_macerator": "ɹ§III ɹoʇɐɹǝɔɐW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_machine_casing": "buısɐƆ ǝuıɥɔɐW ΛƎ", "block.gtceu.ev_machine_hull": "ןןnH ǝuıɥɔɐWɟ§ ΛƎϛ§", + "block.gtceu.ev_magic_energy_absorber": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", "block.gtceu.ev_mixer": "ɹ§III ɹǝxıW pǝɔuɐʌpⱯϛ§", "block.gtceu.ev_muffler_hatch": "ΛƎϛ§ ɥɔʇɐH ɹǝןɟɟnW", "block.gtceu.ev_ore_washer": "ɹ§III ɹǝɥsɐM ǝɹO pǝɔuɐʌpⱯϛ§", @@ -2894,6 +2895,14 @@ "gtceu.machine.machine_hatch.locked": "pǝʞɔoꞀ ǝɔɐɟɹǝʇuI ǝuıɥɔɐW", "gtceu.machine.machine_hatch.processing_array": "ʎɐɹɹⱯ buıssǝɔoɹԀǝ§ ǝɥʇ uı ʞɹoʍ ʇɐɥʇ sǝuıɥɔɐɯ spןoɥ ʎןuo 'ㄥ§ʎɐɹɹⱯ buıssǝɔoɹԀǝ§ ǝɥʇ uı uǝɥM", "gtceu.machine.machine_hatch.tooltip": "sɯǝʇı pıןɐʌ spןoɥ ʎןuo ʇɐɥʇ snᗺ ssǝɔɔⱯ pǝzıןɐıɔǝdS", + "gtceu.machine.magic_energy_absorber.name": "ɹǝqɹosqⱯ ʎbɹǝuƎ ɔıbɐW", + "gtceu.machine.magic_energy_absorber.tooltip.0": "", + "gtceu.machine.magic_energy_absorber.tooltip.1": "˙sʞɔoןq ㄥ§ㄣ9ɹ§ uıɥʇıʍ puƎ ǝɥʇ uı sɹɐןןıd uɐıpısqo pǝʇɐɹǝuǝb ʎןןɐɹnʇɐu uoㄥ§ ɹ§sןɐʇsʎɹƆ puƎq§ ɯoɹɟ ʎbɹǝuǝ sʇɔǝןןoƆㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.2": "ʇndʇno oʇ ㄥ§ʇ/∩Ǝ ᄅƐɹ§ sppɐㄥ§ ɹ§ןɐʇsʎɹƆ puƎq§ ɥɔɐƎㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.3": "ʇndʇno ʎɟıןdɯɐ oʇ doʇ uoㄥ§ ɹ§bbƎ uobɐɹᗡp§ ǝɔɐןԀㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.4": "", + "gtceu.machine.magic_energy_absorber.tooltip.5": ":pǝıɟıןdɯɐ uǝɥMㄥ§", + "gtceu.machine.magic_energy_absorber.tooltip.6": "ʇ/∩Ǝ 8ᄅƖɹ§ sppɐㄥ§ ɹ§ןɐʇsʎɹƆ puƎq§ ɥɔɐƎㄥ§", "gtceu.machine.maintenance_hatch.tooltip": "sʞɔoןqıʇןnW buıuıɐʇuıɐɯ ɹoℲ", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.0": "¡buıuɐǝןƆ ɥʇıʍ sʞɔoןqıʇןnW buıuıɐʇuıɐɯ ʎןןɐɔıʇɐɯoʇnɐ ɹoℲ", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.1": ":sɐ suɐǝןƆ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 366f45806b..a23bfff9c1 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -258,6 +258,7 @@ "block.gtceu.ev_macerator": "§5Advanced Macerator III§r", "block.gtceu.ev_machine_casing": "EV Machine Casing", "block.gtceu.ev_machine_hull": "§5EV §fMachine Hull", + "block.gtceu.ev_magic_energy_absorber": "Magic Energy Absorber", "block.gtceu.ev_mixer": "§5Advanced Mixer III§r", "block.gtceu.ev_muffler_hatch": "Muffler Hatch §5EV", "block.gtceu.ev_ore_washer": "§5Advanced Ore Washer III§r", @@ -2894,6 +2895,14 @@ "gtceu.machine.machine_hatch.locked": "Machine Interface Locked", "gtceu.machine.machine_hatch.processing_array": "When in the §eProcessing Array§7, only holds machines that work in the §eProcessing Array", "gtceu.machine.machine_hatch.tooltip": "Specialized Access Bus that only holds valid items", + "gtceu.machine.magic_energy_absorber.name": "Magic Energy Absorber", + "gtceu.machine.magic_energy_absorber.tooltip.0": "", + "gtceu.machine.magic_energy_absorber.tooltip.1": "§7Collects energy from §bEnd Crystals§r §7on naturally generated obsidian pillars in the End within §r64§7 blocks.", + "gtceu.machine.magic_energy_absorber.tooltip.2": "§7Each §bEnd Crystal§r §7adds §r32 EU/t§7 to output", + "gtceu.machine.magic_energy_absorber.tooltip.3": "§7Place §dDragon Egg§r §7on top to amplify output", + "gtceu.machine.magic_energy_absorber.tooltip.4": "", + "gtceu.machine.magic_energy_absorber.tooltip.5": "§7When amplified:", + "gtceu.machine.magic_energy_absorber.tooltip.6": "§7Each §bEnd Crystal§r §7adds §r128 EU/t", "gtceu.machine.maintenance_hatch.tooltip": "For maintaining Multiblocks", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.0": "For automatically maintaining Multiblocks with Cleaning!", "gtceu.machine.maintenance_hatch_cleanroom_auto.tooltip.1": "Cleans as:",