Skip to content

Commit

Permalink
Make Neptunium Fillet Knife truly unbreakable
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Oct 28, 2020
1 parent 6c6cbfb commit a27dd8e
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ItemFilletKnife extends SwordItem {
private final float attackDamage;

public ItemFilletKnife(IItemTier material) {
super(material, 0, 0.0F, new Item.Properties().group(Aquaculture.GROUP).defaultMaxDamage((int) (material.getMaxUses() * 0.75F))); //Setting values to 0, since overriding vanilla behaviour anyways
super(material, 0, 0.0F, new Item.Properties().group(Aquaculture.GROUP).defaultMaxDamage(material == AquacultureAPI.MATS.NEPTUNIUM ? -1 : (int) (material.getMaxUses() * 0.75F))); //Setting values to 0, since overriding vanilla behaviour anyways
this.attackDamage = material.getAttackDamage() / 2;
}

Expand Down Expand Up @@ -62,16 +62,6 @@ public Multimap<String, AttributeModifier> getAttributeModifiers(@Nonnull Equipm
return map;
}

@Override
public boolean hitEntity(@Nonnull ItemStack stack, @Nonnull LivingEntity target, @Nonnull LivingEntity attacker) {
return this.getTier() == AquacultureAPI.MATS.NEPTUNIUM || super.hitEntity(stack, target, attacker);
}

@Override
public boolean onBlockDestroyed(@Nonnull ItemStack stack, @Nonnull World world, @Nonnull BlockState state, @Nonnull BlockPos pos, @Nonnull LivingEntity entityLiving) {
return getTier() == AquacultureAPI.MATS.NEPTUNIUM || super.onBlockDestroyed(stack, world, state, pos, entityLiving);
}

@Override
@OnlyIn(Dist.CLIENT)
public void addInformation(@Nonnull ItemStack stack, @Nullable World world, @Nonnull List<ITextComponent> tooltip, @Nonnull ITooltipFlag tooltipFlag) {
Expand Down

0 comments on commit a27dd8e

Please sign in to comment.