Shift-Right click on non-block to clear freq. transmitter and advanced drill/chainsaw recipes.
This commit is contained in:
parent
58037e3c9c
commit
3cf950d491
6 changed files with 63 additions and 52 deletions
|
@ -4,6 +4,7 @@ import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
|
@ -50,14 +51,32 @@ public class ItemFrequencyTransmitter extends ItemTextureBase implements ITextur
|
|||
TextFormatting.GRAY + " Z: " +
|
||||
TextFormatting.GOLD + pos.getZ() +
|
||||
TextFormatting.GRAY + " " + I18n.translateToLocal("techreborn.message.in") + " " +
|
||||
TextFormatting.GOLD + DimensionManager.getProviderType(world.provider.getDimension()).getName() + " ("+world.provider.getDimension()+")"));
|
||||
TextFormatting.GOLD + DimensionManager.getProviderType(world.provider.getDimension())
|
||||
.getName() + " (" + world.provider.getDimension() + ")"));
|
||||
}
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player,
|
||||
EnumHand hand)
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
stack.setTagCompound(null);
|
||||
if (!world.isRemote && ConfigTechReborn.FreqTransmitterChat)
|
||||
{
|
||||
ChatUtils.sendNoSpamClient(new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.coordsHaveBeen") + " "
|
||||
+ TextFormatting.GOLD + I18n.translateToLocal("techreborn.message.cleared")));
|
||||
}
|
||||
}
|
||||
|
||||
return new ActionResult<>(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
if(ConfigTechReborn.FreqTransmitterTooltip)
|
||||
if (ConfigTechReborn.FreqTransmitterTooltip)
|
||||
{
|
||||
if (stack.getTagCompound() != null)
|
||||
{
|
||||
|
@ -73,7 +92,7 @@ public class ItemFrequencyTransmitter extends ItemTextureBase implements ITextur
|
|||
|
||||
} else
|
||||
{
|
||||
list.add(TextFormatting.GRAY + "No Coordinates Set");
|
||||
list.add(TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.noCoordsSet"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package techreborn.items;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.List;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,9 +7,12 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import techreborn.utils.upgrade.IMachineUpgrade;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.utils.upgrade.IMachineUpgrade;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemUpgrades extends ItemTextureBase implements IMachineUpgrade, ITexturedItem
|
||||
{
|
||||
|
@ -93,6 +93,8 @@ public class ItemUpgrades extends ItemTextureBase implements IMachineUpgrade, IT
|
|||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
tooltip.add(TextFormatting.RED + "Upgrades DO NOT function!");
|
||||
tooltip.add(TextFormatting.RED + "Currently only a crafting ingredient");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
public class ItemAdvancedChainsaw extends ItemChainsaw
|
||||
{
|
||||
|
||||
|
@ -37,10 +30,4 @@ public class ItemAdvancedChainsaw extends ItemChainsaw
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
public class ItemAdvancedDrill extends ItemDrill
|
||||
{
|
||||
|
||||
|
@ -37,10 +30,4 @@ public class ItemAdvancedDrill extends ItemDrill
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue