From 59faae67959049a88472741536baa26da47b3046 Mon Sep 17 00:00:00 2001 From: Voidsong Dragonfly Date: Sun, 31 Dec 2023 12:50:38 -0500 Subject: [PATCH] Insert fluorescent tube directly to inventory --- .../common/entities/FluorescentTubeEntity.java | 12 ++++++++++++ .../immersiveengineering/manual/en_us/tesla_coil.txt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/blusunrize/immersiveengineering/common/entities/FluorescentTubeEntity.java b/src/main/java/blusunrize/immersiveengineering/common/entities/FluorescentTubeEntity.java index dbdce66c05..7a2f2a7b0c 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/entities/FluorescentTubeEntity.java +++ b/src/main/java/blusunrize/immersiveengineering/common/entities/FluorescentTubeEntity.java @@ -182,6 +182,18 @@ public InteractionResult interactAt(Player player, Vec3 targetVec3, InteractionH entityData.set(dataMarker_angleHorizontal, angleHorizontal); return InteractionResult.SUCCESS; } + else if (player.isShiftKeyDown()) + { + if(isAlive()&&!level.isClientSide&&player.getItemInHand(hand).isEmpty()) + { + ItemStack tube = new ItemStack(Misc.FLUORESCENT_TUBE); + FluorescentTubeItem.setRGB(tube, rgb); + ItemEntity ent = new ItemEntity(level, player.getX(), player.getY(), player.getZ(), tube, 0, 0, 0); + level.addFreshEntity(ent); + discard(); + } + return InteractionResult.SUCCESS; + } return super.interactAt(player, targetVec3, hand); } } diff --git a/src/main/resources/assets/immersiveengineering/manual/en_us/tesla_coil.txt b/src/main/resources/assets/immersiveengineering/manual/en_us/tesla_coil.txt index a13b9ca963..4e65c37504 100644 --- a/src/main/resources/assets/immersiveengineering/manual/en_us/tesla_coil.txt +++ b/src/main/resources/assets/immersiveengineering/manual/en_us/tesla_coil.txt @@ -6,4 +6,4 @@ The coil is disabled unless supplied with a redstone signal. Rightclicking it wi In addition to damage, the shocks will also apply a lingering debuff, "Stunned", preventing the entity from teleporting. Rightclicking the coil with an Engineer's Screwdriver while sneaking will toggle the coil between high- and low-power mode. to be able to do so safely the coil has to be turned off. It is in high-power mode by default. When the coil is in low-power mode it will use half the usual energy and have half the range. <&faraday_recipes>If you are wearing a full Faraday suit, a coil in low-power mode won't harm you, but still shoot lightning at you. The suit will also protect you from uninsulated wiring. Coils in high-power mode use special techniques to make their discharges more lethal and will cause the suit to melt, thereby increasing the damage done to you and additionally damaging the suit. -<&tube_recipes>Fluorescent tubes glow when placed inside a strong high-frequency electric field. Such a frequency is generated by any tesla coil, so placing a tube near an active tesla coil will cause it to glow. The range is about 1.5 times the range in which you will be hit by lightning. They can be colored in the engineer's workbench and rotated by shift + rightclicking them with an Engineer's Hammer. \ No newline at end of file +<&tube_recipes>Fluorescent tubes glow when placed inside a strong high-frequency electric field. Such a frequency is generated by any tesla coil, so placing a tube near an active tesla coil will cause it to glow. The range is about 1.5 times the range in which you will be hit by lightning. They can be colored in the engineer's workbench and rotated by shift + rightclicking them with an Engineer's Hammer. Tubes can be picked up directly by shift + rightclicking with an empty hand. \ No newline at end of file