2
I'm trying to make a particle VIBRATION fly out of the player when using an item
@Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
world.addParticle((ParticleEffect) ParticleTypes.VIBRATION,true , playerEntity.getX(), playerEntity.getY(), playerEntity.getZ(),10.0,0.0,0.0);
world.addParticle(ParticleTypes.HEART, playerEntity.getX(), playerEntity.getY() + 2.0, playerEntity.getZ(), 0.0, 0.0, 0.0);
return TypedActionResult.success(playerEntity.getStackInHand(hand));
}
Create an account or sign in to comment.