0
我在1.7.10过这种去除world.setblock,没有任何错误,直到他们1.8取出world.setblock的Minecraft 1.8
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world,
EntityPlayer entityPlayer) {
if(entityPlayer.capabilities.isCreativeMode||entityPlayer.inventory.consumeInventoryItem(Items.sugar))
{
//play sound stuff com.example.examplemod.SoundHandler.onEntityPlay("fizz", Event.player.worldObj, Event.player, 1, 1);
if (!world.isClient)
{
Vec3 look = entityPlayer.getLookVec();
world.setBlock((int) (entityPlayer.posX + look.xCoord * 5),
(int) (entityPlayer.posY + look.yCoord * 5),
(int) (entityPlayer.posZ + look.zCoord * 5),
Block.getBlockById(79));
}
}
return itemStack;
}
现在,我怎么在1.8的方向设置的块玩家正在面对,如果一个街区正在用冰块取代它。每次点击左键点击时我该如何播放声音