Skip to content

Commit

Permalink
Notify the player in the status bar when changing the mining area
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Dec 3, 2018
1 parent f3f5c54 commit 0fc0fdb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
Expand Down Expand Up @@ -301,7 +302,9 @@ public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer play
if (player.isSneaking()) {
player.playSound(SoundEvents.BLOCK_LEVER_CLICK, 0.5f, 0.5f);
ItemStack stack = player.getHeldItem(handIn);
setSelectedDrillTier(stack, getSelectedDrillTier(stack).getNext(DrillTier.getTierBraquet(getPowerFromStack(stack)).getLeft()));
DrillTier next = getSelectedDrillTier(stack).getNext(DrillTier.getTierBraquet(getPowerFromStack(stack)).getLeft());
player.sendStatusMessage(new TextComponentString(new TextComponentTranslation("text.industrialforegoing.display.current_area").getUnformattedText() + " " + getFormattedArea(next, next.getRadius())), true);
setSelectedDrillTier(stack, next);
}
return super.onItemRightClick(worldIn, player, handIn);
}
Expand Down

0 comments on commit 0fc0fdb

Please sign in to comment.