From fe1f031c92f12c0e5cfeef61ce3027beedd113ee Mon Sep 17 00:00:00 2001 From: thepigcat Date: Mon, 30 Sep 2024 16:01:30 +0200 Subject: [PATCH] fix guardian augment --- .../recipe/aquatic_catalyst_channeling/corals.json | 9 +++++++++ .../resources/data/nautec/tags/item/corals.json | 14 ++++++++++++++ .../content/augments/GuardianEyeAugment.java | 9 ++++++++- .../nautec/datagen/EnUsProvider.java | 2 +- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/generated/resources/data/nautec/recipe/aquatic_catalyst_channeling/corals.json create mode 100644 src/generated/resources/data/nautec/tags/item/corals.json diff --git a/src/generated/resources/data/nautec/recipe/aquatic_catalyst_channeling/corals.json b/src/generated/resources/data/nautec/recipe/aquatic_catalyst_channeling/corals.json new file mode 100644 index 00000000..ce6915f1 --- /dev/null +++ b/src/generated/resources/data/nautec/recipe/aquatic_catalyst_channeling/corals.json @@ -0,0 +1,9 @@ +{ + "type": "nautec:aquatic_catalyst_channeling", + "duration": 200, + "ingredient": { + "tag": "nautec:corals" + }, + "power_amount": 1400, + "purity": 0.4 +} \ No newline at end of file diff --git a/src/generated/resources/data/nautec/tags/item/corals.json b/src/generated/resources/data/nautec/tags/item/corals.json new file mode 100644 index 00000000..8625c32d --- /dev/null +++ b/src/generated/resources/data/nautec/tags/item/corals.json @@ -0,0 +1,14 @@ +{ + "values": [ + "minecraft:tube_coral", + "minecraft:brain_coral", + "minecraft:bubble_coral", + "minecraft:fire_coral", + "minecraft:horn_coral", + "minecraft:tube_coral_fan", + "minecraft:brain_coral_fan", + "minecraft:bubble_coral_fan", + "minecraft:fire_coral_fan", + "minecraft:horn_coral_fan" + ] +} \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/nautec/content/augments/GuardianEyeAugment.java b/src/main/java/com/portingdeadmods/nautec/content/augments/GuardianEyeAugment.java index 1d8dd7d7..aa0b1f82 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/augments/GuardianEyeAugment.java +++ b/src/main/java/com/portingdeadmods/nautec/content/augments/GuardianEyeAugment.java @@ -30,11 +30,15 @@ public GuardianEyeAugment(AugmentSlot augmentSlot) { @Override public void clientTick(PlayerTickEvent.Post event) { - if (NTKeybinds.ACTIVATE_LASER_KEYBIND.get().consumeClick()) { + if (NTKeybinds.ACTIVATE_LASER_KEYBIND.get().isDown()) { PacketDistributor.sendToServer(new KeyPressedPayload(augmentSlot)); handleKeybindPress(); } + if (targetEntity != null && !targetEntity.isAlive()) { + targetEntity = null; + } + if (targetEntity != null) { if (clientLaserTime < getLaserAnimTimeDuration()) { this.clientLaserTime += 0.5f; @@ -82,6 +86,7 @@ public void handleKeybindPress() { for (double t = 0; t <= maxDistance; t += step) { Vec3 checkPos = startPos.add(look.scale(t)); List entities = player.level().getEntitiesOfClass(LivingEntity.class, new AABB(checkPos.add(-0.5, -0.5, -0.5), checkPos.add(0.5, 0.5, 0.5))); + for (LivingEntity entity : entities) { if (entity != player) { if (!player.level().isClientSide) { @@ -95,6 +100,8 @@ public void handleKeybindPress() { } } } + + this.targetEntity = null; } public Entity getTargetEntity() { diff --git a/src/main/java/com/portingdeadmods/nautec/datagen/EnUsProvider.java b/src/main/java/com/portingdeadmods/nautec/datagen/EnUsProvider.java index c469e7aa..c41f0867 100644 --- a/src/main/java/com/portingdeadmods/nautec/datagen/EnUsProvider.java +++ b/src/main/java/com/portingdeadmods/nautec/datagen/EnUsProvider.java @@ -100,7 +100,7 @@ protected void addTranslations() { addBlock("prismarine_laser_relay", "Prismarine Laser Relay"); addBlock("deep_sea_drain", "Deep Sea Drain"); addBlock("augmentation_station_part", "Augmentation Station"); - addBlock("augmentation_station_extentsion", "Augmentation Station Extension"); + addBlock(NTBlocks.AUGMENTATION_STATION_EXTENSION, "Augmentation Station Extension"); addBlock(NTBlocks.CHARGER, "Charger"); addBlock(NTBlocks.PRISMARINE_SAND, "Prismarine Sand");