Skip to content

Commit

Permalink
fix guardian augment
Browse files Browse the repository at this point in the history
  • Loading branch information
Thepigcat76 committed Sep 30, 2024
1 parent 21314c8 commit fe1f031
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "nautec:aquatic_catalyst_channeling",
"duration": 200,
"ingredient": {
"tag": "nautec:corals"
},
"power_amount": 1400,
"purity": 0.4
}
14 changes: 14 additions & 0 deletions src/generated/resources/data/nautec/tags/item/corals.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -82,6 +86,7 @@ public void handleKeybindPress() {
for (double t = 0; t <= maxDistance; t += step) {
Vec3 checkPos = startPos.add(look.scale(t));
List<LivingEntity> 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) {
Expand All @@ -95,6 +100,8 @@ public void handleKeybindPress() {
}
}
}

this.targetEntity = null;
}

public Entity getTargetEntity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit fe1f031

Please sign in to comment.