mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
No more errors, the game launches, rejoice!
This commit is contained in:
1 parent
79af86daae
commit
ceec3e71e9
67 files changed
+951
-676
No files matched your search
@@ -13,6 +13,9 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -75,19 +78,22 @@ public class ItemCraftingFormula extends ItemMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
|
||||
{
|
||||
if(player.isSneaking() && !world.isRemote)
|
||||
if(player.isSneaking())
|
||||
{
|
||||
setInventory(stack, null);
|
||||
setInvalid(stack, false);
|
||||
if(!world.isRemote)
|
||||
{
|
||||
setInventory(stack, null);
|
||||
setInvalid(stack, false);
|
||||
|
||||
((EntityPlayerMP)player).sendContainerToPlayer(player.openContainer);
|
||||
}
|
||||
|
||||
((EntityPlayerMP)player).sendContainerToPlayer(player.openContainer);
|
||||
|
||||
return stack;
|
||||
return new ActionResult(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
return stack;
|
||||
return new ActionResult(EnumActionResult.PASS, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user