Skip to content

Commit

Permalink
This should be it
Browse files Browse the repository at this point in the history
- Added a few things that I missed on the last commit
  • Loading branch information
Jacky1356400 committed Jul 31, 2017
1 parent a44a135 commit b0a9c03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public void addInformation(ItemStack stack, EntityPlayer player, List<String> to
int meta = compound.getInteger("meta");

tooltip.add(StringHelper.localize("tooltip.selectedblock") + " " + getBlockName(block, meta));
tooltip.add(StringHelper.localize("tooltip.selectedmode") + " " + modeSwitchList[compound.getInteger("mode")]);
tooltip.add(StringHelper.localize("tooltip.currentrange") + " " + modeSwitchList[compound.getInteger("mode")]);
tooltip.add(StringHelper.localize("tooltip.maxrange") + " " + modeSwitchList[getMaxRange()]);
}
if (StringHelper.isShiftKeyDown()) {
tooltip.remove(StringHelper.getShiftText());
Expand Down Expand Up @@ -161,6 +162,12 @@ private void placeBlock(ItemStack stack, EntityPlayer player, World world, Block
return;
}
}
if (isPowered() && stack.getTagCompound().getInteger("Energy") < getPerBlockUse()) {
if (!isCreative()) {
msgPlayer(player, StringHelper.localize("error.nopower"));
return;
}
}
Set<BlockPos> coordinates = findSuitableBlocks(stack, world, side, pos, oldblock, oldmeta);
boolean notEnough = false;
for (BlockPos coordinate : coordinates) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/assets/exchangers/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ exchangers.tooltip.shift2=Right click on a block to exchange.
exchangers.tooltip.shift3=Use the mode key to switch modes.
exchangers.tooltip.tuberousExchanger.warning=§c§oClever! But not exchangeable.
exchangers.tooltip.selectedblock=§2Selected Block:
exchangers.tooltip.selectedmode=§2Selected Mode:
exchangers.tooltip.currentrange=§2Current Range:
exchangers.tooltip.maxrange=§2Maximum Range:
exchangers.tooltip.noselectedblock=§4No Selected Block

#Messages
#Error Messages
exchangers.error.invalidblock=§cError: Invalid block!
exchangers.error.outofblock=§cError: Out of block!
exchangers.error.nopower=§cError: Out of power!
Expand Down

0 comments on commit b0a9c03

Please sign in to comment.