mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-12 08:17:37 +00:00
BlockTooltip will now use the new HasItemBlock trait
This commit is contained in:
1 parent
ebe2c1f34a
commit
17e4bf3a2f
1 file changed
+2
-2
@@ -15,7 +15,8 @@ import net.minecraft.block.Block
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
import net.minecraft.item.{ItemBlock, ItemStack}
|
||||
|
||||
trait BlockTooltip extends Block {
|
||||
trait BlockTooltip extends Block with HasItemBlock {
|
||||
override val ItemBlockClass: Class[_ <: ItemBlock] = classOf[ItemBlockTooltip]
|
||||
def getTooltip(stack: ItemStack, player: EntityPlayer, advanced: Boolean): List[String]
|
||||
}
|
||||
|
||||
@@ -25,5 +26,4 @@ class ItemBlockTooltip(b: Block) extends ItemBlock(b) {
|
||||
if (b.isInstanceOf[BlockTooltip])
|
||||
list.asInstanceOf[util.List[String]].addAll(b.asInstanceOf[BlockTooltip].getTooltip(stack, player, advanced))
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user