package eiteam.esteemedinnovation.firearms.flintlock.enhancements;
import eiteam.esteemedinnovation.api.enhancement.EnhancementFirearm;
import eiteam.esteemedinnovation.api.entity.EntityMusketBall;
import eiteam.esteemedinnovation.commons.EsteemedInnovation;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import static eiteam.esteemedinnovation.firearms.FirearmModule.PISTOL;
public class ItemEnhancementSilencer extends Item implements EnhancementFirearm {
@Override
public boolean canApplyTo(ItemStack stack) {
return stack.getItem() == PISTOL;
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EsteemedInnovation.upgrade;
}
@Override
public String getID() {
return "Silencer";
}
@Override
public ResourceLocation getModel(Item item) {
return new ResourceLocation(EsteemedInnovation.MOD_ID, "pistol_silencer");
}
@Override
public String getName(Item item) {
return "item.esteemedinnovation:pistolSilencer";
}
@Override
public float getAccuracyChange(Item weapon) {
return 0;
}
@Override
public float getKnockbackChange(Item weapon) {
return 0;
}
@Override
public float getDamageChange(Item weapon) {
return 0;
}
@Override
public int getReloadChange(Item weapon) {
return 0;
}
@Override
public int getClipSizeChange(Item weapon) {
return 0;
}
@Override
public EntityMusketBall changeBullet(EntityMusketBall bullet) {
bullet.silenced = true;
return bullet;
}
@Override
public float getVolume(ItemStack weaponStack, World world, EntityLivingBase user) {
return 0.4F;
}
}