Run formatter
This commit is contained in:
parent
61c44a831b
commit
08258fd6ef
606 changed files with 13464 additions and 22975 deletions
|
@ -14,7 +14,6 @@ import net.minecraft.util.*;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
|
@ -22,12 +21,10 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSoulSnare extends Item implements IVariantProvider
|
||||
{
|
||||
public static String[] names = { "base" };
|
||||
public class ItemSoulSnare extends Item implements IVariantProvider {
|
||||
public static String[] names = {"base"};
|
||||
|
||||
public ItemSoulSnare()
|
||||
{
|
||||
public ItemSoulSnare() {
|
||||
super();
|
||||
|
||||
setUnlocalizedName(BloodMagic.MODID + ".soulSnare.");
|
||||
|
@ -37,18 +34,15 @@ public class ItemSoulSnare extends Item implements IVariantProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(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)
|
||||
{
|
||||
if (!playerIn.capabilities.isCreativeMode) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (!worldIn.isRemote) {
|
||||
EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn);
|
||||
snare.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
worldIn.spawnEntity(snare);
|
||||
|
@ -58,15 +52,13 @@ public class ItemSoulSnare extends Item implements IVariantProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack)
|
||||
{
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName(stack) + names[stack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(CreativeTabs creativeTab, NonNullList<ItemStack> list)
|
||||
{
|
||||
public void getSubItems(CreativeTabs creativeTab, NonNullList<ItemStack> list) {
|
||||
if (!isInCreativeTab(creativeTab))
|
||||
return;
|
||||
|
||||
|
@ -76,16 +68,14 @@ public class ItemSoulSnare extends Item implements IVariantProvider
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
|
||||
{
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.soulSnare.desc"))));
|
||||
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
public List<Pair<Integer, String>> getVariants() {
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
ret.add(new ImmutablePair<Integer, String>(0, "type=soulsnare"));
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue