Everything else except sigils
This commit is contained in:
parent
128b3d29b0
commit
51e10eaad2
46 changed files with 289 additions and 354 deletions
|
@ -10,10 +10,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -40,23 +37,24 @@ public class ItemSoulSnare extends Item implements IVariantProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
|
||||
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand)
|
||||
{
|
||||
ItemStack stack = playerIn.getHeldItem(hand);
|
||||
if (!playerIn.capabilities.isCreativeMode)
|
||||
{
|
||||
--itemStackIn.stackSize;
|
||||
stack.shrink(1);
|
||||
}
|
||||
|
||||
worldIn.playSound((EntityPlayer) null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
worldIn.playSound(null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
if (!worldIn.isRemote)
|
||||
{
|
||||
EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn);
|
||||
snare.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
worldIn.spawnEntityInWorld(snare);
|
||||
worldIn.spawnEntity(snare);
|
||||
}
|
||||
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStackIn);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +65,7 @@ public class ItemSoulSnare extends Item implements IVariantProvider
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, NonNullList<ItemStack> list)
|
||||
{
|
||||
for (int i = 0; i < names.length; i++)
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue