Added additional anointments as well as some misc things

Added several Anointments (still need to list them fully).
Also made it so that the Charges can be thrown.
This commit is contained in:
WayofTime 2021-01-15 10:10:55 -05:00
parent e2ce9a473b
commit 5713d6db2a
42 changed files with 1222 additions and 446 deletions

View file

@ -0,0 +1,49 @@
package wayoftime.bloodmagic.common.item.block;
import net.minecraft.block.Block;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.world.World;
import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge;
public class ItemBlockShapedCharge extends BlockItem
{
public ItemBlockShapedCharge(Block blockIn, Properties builder)
{
super(blockIn, builder);
}
@Override
public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand)
{
ItemStack stack = playerIn.getHeldItem(hand);
if (!playerIn.isCreative())
{
stack.shrink(1);
}
worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F));
if (!worldIn.isRemote)
{
System.out.println("Attempting to spawn");
// EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn);
EntityShapedCharge charge = new EntityShapedCharge(worldIn, this.getBlock(), playerIn);
charge.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
worldIn.addEntity(charge);
//
// SnowballEntity snowballentity = new SnowballEntity(worldIn, playerIn);
// snowballentity.setItem(itemstack);
// snowballentity.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
// worldIn.addEntity(snowballentity);
}
return new ActionResult<>(ActionResultType.SUCCESS, stack);
}
}