Unicopia/src/main/java/com/minelittlepony/unicopia/item/MuffinItem.java

27 lines
889 B
Java
Raw Normal View History

2022-03-27 16:02:14 +02:00
package com.minelittlepony.unicopia.item;
import org.jetbrains.annotations.Nullable;
import com.minelittlepony.unicopia.advancement.UCriteria;
import com.minelittlepony.unicopia.entity.PhysicsBodyProjectileEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
2022-03-27 16:02:14 +02:00
public class MuffinItem extends HeavyProjectileItem {
public MuffinItem(Settings settings, float projectileDamage) {
super(settings, projectileDamage);
}
@Override
protected PhysicsBodyProjectileEntity createProjectile(ItemStack stack, World world, @Nullable PlayerEntity player) {
PhysicsBodyProjectileEntity projectile = super.createProjectile(stack, world, player);
projectile.setBouncy();
projectile.setDamage(0);
UCriteria.THROW_MUFFIN.trigger(player);
return projectile;
}
2022-03-27 16:02:14 +02:00
}