Skip to content

Commit

Permalink
Insert fluorescent tube directly to inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
voidsong-dragonfly committed Dec 31, 2023
1 parent 0619039 commit 59faae6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.<np>
<&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.<np>
<&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.
<&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.

0 comments on commit 59faae6

Please sign in to comment.