Fix nanosaber log spam
This commit is contained in:
parent
08087871a1
commit
e0300d3a05
1 changed files with 15 additions and 15 deletions
|
@ -120,11 +120,11 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
|||
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player,
|
||||
EnumHand hand) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
public ActionResult<ItemStack> onItemRightClick(final World world, final EntityPlayer player,
|
||||
final EnumHand hand) {
|
||||
final ItemStack stack = player.getHeldItem(hand);
|
||||
if (player.isSneaking()) {
|
||||
if (!PoweredItem.canUseEnergy(cost, stack)) {
|
||||
if (!PoweredItem.canUseEnergy(this.cost, stack)) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.nanosaberEnergyErrorTo") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
|
@ -135,7 +135,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
|||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
stack.getTagCompound().setBoolean("isActive", true);
|
||||
if (!world.isRemote && ConfigTechReborn.NanosaberChat) {
|
||||
if (world.isRemote && ConfigTechReborn.NanosaberChat) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.setTo") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
|
@ -143,7 +143,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
|||
}
|
||||
} else {
|
||||
stack.getTagCompound().setBoolean("isActive", false);
|
||||
if (!world.isRemote && ConfigTechReborn.NanosaberChat) {
|
||||
if (world.isRemote && ConfigTechReborn.NanosaberChat) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.setTo") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue