Skip to content

Commit

Permalink
Drain Tricorder energy only when in survival (GregTechCEu#2402)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC authored Mar 3, 2024
1 parent ae5ef98 commit 74272b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPo

List<ITextComponent> info = getScannerInfo(player, world, pos);
if (player.isCreative() || drainEnergy(player.getHeldItem(hand), energyCost, true)) {
drainEnergy(player.getHeldItem(hand), energyCost, false);
if (!player.isCreative()) {
drainEnergy(player.getHeldItem(hand), energyCost, false);
}
for (ITextComponent line : info) {
player.sendMessage(line);
}
Expand Down

0 comments on commit 74272b2

Please sign in to comment.