public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
{
EntityEquipmentSlot entityequipmentslot = EntityLiving.getSlotForItemStack(itemStackIn);
ItemStack itemstack = playerIn.getItemStackFromSlot(entityequipmentslot);
if (itemstack == null)
{
playerIn.setItemStackToSlot(entityequipmentslot, itemStackIn.copy());
itemStackIn.stackSize = 0;
return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
}
else
{
return new ActionResult(EnumActionResult.FAIL, itemStackIn);
}
}
ItemElytra.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:CustomWorldGen
作者:
评论列表
文章目录