Skip to content

Commit

Permalink
Reduce portable cell battery back to normal for now
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Jun 4, 2022
1 parent 514ce44 commit 04b7120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ private void portable(Consumer<FinishedRecipe> consumer, Item portableCellItem)
ShapelessRecipeBuilder.shapeless(portableCell)
.requires(AEBlocks.CHEST)
.requires(portableCell.tier.getComponent())
.requires(AEBlocks.DENSE_ENERGY_CELL)
.requires(AEBlocks.ENERGY_CELL)
.requires(housing)
.unlockedBy("has_" + MEGAItems.getItemPath(housing), has(housing))
.unlockedBy("has_dense_energy_cell", has(AEBlocks.DENSE_ENERGY_CELL))
.unlockedBy("has_energy_cell", has(AEBlocks.ENERGY_CELL))
.save(consumer, MEGACells.makeId("cells/portable/" + MEGAItems.getItemPath(portableCell)));
}

Expand Down
29 changes: 0 additions & 29 deletions src/main/java/ninety/megacells/item/MEGAPortableCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,4 @@ private static StorageTier makePortableTier(MEGATier tier) {
public ResourceLocation getRecipeId() {
return MEGACells.makeId("cells/portable/" + Objects.requireNonNull(getRegistryName()).getPath());
}

@Override
public double getChargeRate(ItemStack stack) {
return super.getChargeRate(stack) * 8;
}

@Override
public double getAEMaxPower(ItemStack stack) {
return super.getAEMaxPower(stack) * 8;
}

@Override
public IUpgradeInventory getUpgrades(ItemStack is) {
return UpgradeInventories.forItem(is, 2, this::onUpgradesChanged);
}

private void onUpgradesChanged(ItemStack stack, IUpgradeInventory upgrades) {
var energyCards = upgrades.getInstalledUpgrades(AEItems.ENERGY_CARD);
setAEMaxPowerMultiplier(stack, 1 + energyCards);
}

@Override
public void appendHoverText(ItemStack stack, Level level, List<Component> lines, TooltipFlag advancedTooltips) {
super.appendHoverText(stack, level, lines, advancedTooltips);
if (!AppMekIntegration.isAppMekLoaded() && this.type == ChemicalCellType.TYPE) {
lines.add(new TextComponent("AppMek not installed."));
}
}

}

0 comments on commit 04b7120

Please sign in to comment.