- @Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,@Nullable ItemStack heldItem, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
- }
下面是父类 我的MDK版本是1.12.2请问一下大佬 现在是怎么判断激活方块时手中的物品啊
- /**
- * Called when the block is right clicked by a player.
- */
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
- {
- return false;
- }
- playerIn.getHeldItem(hand)
好哥哥 那怎么屏幕打印大字和聊天框输出调试信息呢
- Minecraft.getMinecraft().ingameGUI.addChatMessage(ChatType.SYSTEM, new TextComponentString("info"));
- Minecraft.getMinecraft().ingameGUI.displayTitle("title", "", 20, 70, 5);
大佬牛逼 爱你好哥哥
好好哥哥 周围方块更新怎么搞啊 弟弟太菜了
GiNYAi 发表于 2019-12-7 20:12
World#notifyNeighborsOfStateChange
大概是这样
他需要传递一个BlockType 我不知道怎么传才是全部方块