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 3c41e96 commit 5bcf111
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ItemFilletKnife extends SwordItem {
private final Multimap<Attribute, AttributeModifier> attributes;

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;

ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder();
Expand Down Expand Up @@ -63,17 +63,6 @@ public float getAttackDamage() {
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(@Nonnull EquipmentSlotType slotType) {
return slotType == EquipmentSlotType.MAINHAND ? this.attributes : ImmutableMultimap.of();
}

@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 5bcf111

Please sign in to comment.