2022-03-27 16:02:14 +02:00
|
|
|
package com.minelittlepony.unicopia.item;
|
|
|
|
|
2022-04-01 00:40:39 +02:00
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
|
|
|
import com.minelittlepony.unicopia.advancement.UCriteria;
|
2022-03-27 17:55:02 +02:00
|
|
|
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);
|
|
|
|
}
|
2022-03-27 17:55:02 +02:00
|
|
|
|
|
|
|
@Override
|
2022-04-01 00:40:39 +02:00
|
|
|
protected PhysicsBodyProjectileEntity createProjectile(ItemStack stack, World world, @Nullable PlayerEntity player) {
|
2022-03-27 17:55:02 +02:00
|
|
|
PhysicsBodyProjectileEntity projectile = super.createProjectile(stack, world, player);
|
|
|
|
projectile.setBouncy();
|
|
|
|
projectile.setDamage(0);
|
2022-04-01 00:40:39 +02:00
|
|
|
UCriteria.THROW_MUFFIN.trigger(player);
|
2022-03-27 17:55:02 +02:00
|
|
|
return projectile;
|
|
|
|
}
|
2022-03-27 16:02:14 +02:00
|
|
|
}
|