1
[Help] addInformation Method on blocks [1.7.10]
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.
Create an account or sign in to comment.
3
1
Name?
Machines++
Machines Are Taking Over
INSERT NAME HERE
Machines++
Machines Are Taking Over
INSERT NAME HERE
1
@SubscribeEvent
public void onItemToolTip(ToolTipEvent event)
{
if (event.itemStack.getItem() == Item.getItemFromBlock(Blocks.iron_block))
{
event.toolTip.add("This is an Iron Block.");
}
}
public void onItemToolTip(ToolTipEvent event)
{
if (event.itemStack.getItem() == Item.getItemFromBlock(Blocks.iron_block))
{
event.toolTip.add("This is an Iron Block.");
}
}
1
[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)}}