mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 22:44:23 +00:00
Add a tooltip containing 'Smeltery' to the casting table/basin/faucet.
Now EVERY smeltery block is found when searching for "smeltery"
This commit is contained in:
1 parent
168126b900
commit
72b0c85c85
2 files changed
+26
No files matched your search
@@ -2,6 +2,11 @@ package tconstruct.smeltery.itemblocks;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SearedTableItemBlock extends MultiItemBlock
|
||||
{
|
||||
@@ -14,4 +19,22 @@ public class SearedTableItemBlock extends MultiItemBlock
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {
|
||||
String tooltip = "";
|
||||
switch (p_77624_1_.getItemDamage()) {
|
||||
case 0:
|
||||
tooltip = "smeltery.castingtable.tooltip";
|
||||
break;
|
||||
case 1:
|
||||
tooltip = "smeltery.castingfaucet.tooltip";
|
||||
break;
|
||||
case 2:
|
||||
tooltip = "smeltery.castingbasin.tooltip";
|
||||
break;
|
||||
}
|
||||
|
||||
if(StatCollector.canTranslate(tooltip))
|
||||
p_77624_3_.add(StatCollector.translateToLocal(tooltip));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user