1

[Help] addInformation Method on blocks [1.7.10]

Mudkip Pixelmon's Avatar Mudkip Pixelmon5/12/15 10:11 pm
1 emeralds 488 3
5/24/2015 6:28 am
that2guy's Avatar that2guy
Hello, I am currently assembling a mod that I hope will get high downloads, My mod is going to add such things as machines, all will work with ThermalDynamics and etc. The thing I need help with in my mod are 2 things, First being the title, anyway to use addInformation on a block? or to cast a block to an ItemStack. Second, How do I add a new config property? I have it creating the config but its empty, I need this to work because my mod as Player item dropping, player item pickup, player crafting, and player block placing, currently logging everything about that event, but in the config I want server owners able to disable and enable it.
Posted by Mudkip Pixelmon's Avatar
Mudkip Pixelmon
Level 1 : New Miner
0

Create an account or sign in to comment.

3

1
05/24/2015 6:28 am
Level 48 : Master Nerd
that2guy
that2guy's Avatar
Name?
Machines++
Machines Are Taking Over
INSERT NAME HERE
1
05/24/2015 5:14 am
Level 96 : Overlord Fish
FiskFille
FiskFille's Avatar
@SubscribeEvent
public void onItemToolTip(ToolTipEvent event)
{
if (event.itemStack.getItem() == Item.getItemFromBlock(Blocks.iron_block))
{
event.toolTip.add("This is an Iron Block.");
}
}
1
05/12/2015 11:46 pm
Level 1 : New Miner
Mudkip Pixelmon
Mudkip Pixelmon's Avatar
[EDIT] One way to do this, which is what I needed, You could use an eventhandler and use the @SubscribeEvent public void yourMethod(ToolTipEvent event){if(event.itemStack.getUnlocalizedName().contains().("sapling")){event.toolTip.add(TEXTHERE)}}
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome