Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void onBlockRightClick(RightClickBlock e)
- {
- ItemStack itemInHand = e.getItemStack();
- String itemInHandName = itemInHand.getItem().getUnlocalizedName();
- String tmpMsg = "";
- if( itemInHandName.equals("tile.air") || e.getHand() == EnumHand.OFF_HAND)
- return;
- if( e.getHand() == EnumHand.MAIN_HAND )
- {
- tmpMsg = "MAIN";
- }else{
- tmpMsg = "OFF";
- }
- //e.getEntityPlayer().sendMessage(new TextComponentString(itemInHandName));
- e.getEntityPlayer().sendMessage(new TextComponentString("------------------"));
- if( itemInHandName.equals("item.appliedenergistics2.nether_quartz_wrench") || itemInHandName.equals("item.appliedenergistics2.certus_quartz_wrench") )
- {
- e.getEntityPlayer().sendMessage(new TextComponentString("Yep! " + tmpMsg));
- }else{
- e.getEntityPlayer().sendMessage(new TextComponentString("Nope! " + tmpMsg));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment