Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Flanks255 committed Dec 7, 2024
1 parent 690aa4b commit c10862c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ public DrillItem() {

attributes_unpowered = ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ActuallyAdditions.modLoc("drill_attack"), 0.1F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ActuallyAdditions.modLoc("drill_speed"), 1.5F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ActuallyAdditions.modLoc("drill_speed"), 1.0F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();

attributes_powered = ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ActuallyAdditions.modLoc("drill_attack"), 8.0F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ActuallyAdditions.modLoc("drill_speed"), 1.5F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ActuallyAdditions.modLoc("drill_speed"), 1.0F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ItemBattery(int capacity, int transfer) {
}

@Override
public boolean isFoil(ItemStack stack) {
public boolean isFoil(@Nonnull ItemStack stack) {
return ItemUtil.isEnabled(stack);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ItemMagnetRing() {
}

@Override
public boolean isFoil(ItemStack stack) {
public boolean isFoil(@Nonnull ItemStack stack) {
return !ItemUtil.isEnabled(stack);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

package de.ellpeck.actuallyadditions.mod.items.base;

import de.ellpeck.actuallyadditions.mod.components.ActuallyComponents;
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
Expand Down Expand Up @@ -58,12 +57,12 @@ public void appendHoverText(@Nonnull ItemStack stack, @Nonnull TooltipContext co
}

@Override
public boolean isFoil(ItemStack stack) {
public boolean isFoil(@Nonnull ItemStack stack) {
return false;
}

@Override
public boolean isBarVisible(ItemStack itemStack) {
public boolean isBarVisible(@Nonnull ItemStack itemStack) {
return true;
}

Expand All @@ -77,7 +76,7 @@ public int getBarWidth(ItemStack stack) {
}

@Override
public int getBarColor(ItemStack stack) {
public int getBarColor(@Nonnull ItemStack stack) {
int defaultColor = super.getBarColor(stack);
if (FMLEnvironment.dist.isClient()) {
Minecraft mc = Minecraft.getInstance();
Expand Down Expand Up @@ -136,20 +135,6 @@ public int getMaxEnergyStored(ItemStack stack) {
.orElse(0);
}

public int getEnergyStorage(ItemStack stack) {
return stack.getOrDefault(ActuallyComponents.ENERGY_STORAGE, 0);
}

@Override
public int getMaxDamage(ItemStack stack) {
return getEnergyStorage(stack);
}

@Override
public boolean isDamageable(ItemStack stack) {
return false;
}

// @Override TODO: Register Energy cap/attachment
// public ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag nbt) {
// return new EnergyCapabilityProvider(stack, this);
Expand Down

0 comments on commit c10862c

Please sign in to comment.