Skip to content

Commit

Permalink
Add stack emc generation on collectors & flowers
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Oct 12, 2023
1 parent 86e464f commit 7618b38
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"block.projectexpansion.black_advanced_alchemical_chest": "Black Advanced Alchemical Chest",
"block.projectexpansion.collector.tooltip": "Generates EMC once per second.",
"block.projectexpansion.collector.emc": "Produced EMC: %s/s",
"block.projectexpansion.collector.stack_emc": "Stack Produced EMC: %s/s",
"block.projectexpansion.basic_collector": "Basic Collector [MK 1]",
"block.projectexpansion.dark_collector": "Dark Collector [MK 2]",
"block.projectexpansion.red_collector": "Red Collector [MK 3]",
Expand Down Expand Up @@ -94,6 +95,7 @@
"block.projectexpansion.transmutation_interface.tooltip": "This can be used with compatible mods like Applied Energistics to access your transmutation inventory.",
"block.projectexpansion.power_flower.tooltip": "Generates EMC once per %s tick%s. (20/second)",
"block.projectexpansion.power_flower.emc": "Produced EMC: %s/s",
"block.projectexpansion.power_flower.stack_emc": "Stack Produced EMC: %s/s",
"block.projectexpansion.basic_power_flower": "Basic Power Flower [MK 1]",
"block.projectexpansion.dark_power_flower": "Dark Power Flower [MK 2]",
"block.projectexpansion.red_power_flower": "Red Power Flower [MK 3]",
Expand Down Expand Up @@ -255,7 +257,7 @@
"item.projectexpansion.advanced_alchemical_book": "Advanced Alchemical Book",
"item.projectexpansion.master_alchemical_book": "Master Alchemical Book",
"item.projectexpansion.arcane_alchemical_book": "Arcane Alchemical Book",
"item.projectexpansion.alchemical_book.tooltip": "Teleport anywhere using emc.",
"item.projectexpansion.alchemical_book.tooltip": "Teleport anywhere, simply using emc.",
"item.projectexpansion.alchemical_book.tooltip_basic": "Teleportation (%s/Block)",
"item.projectexpansion.alchemical_book.tooltip_advanced": "50%% Cheaper Teleportation (%s/Block)",
"item.projectexpansion.alchemical_book.tooltip_master": "80%% Cheaper Teleportation (%s/Block)",
Expand Down Expand Up @@ -348,6 +350,7 @@
"item.projectexpansion.knowledge_sharing_book.learned_total": "You have learned %s item(s) from %s.",
"item.projectexpansion.knowledge_sharing_book.no_new_knowledge": "You learned nothing new.",
"item.projectexpansion.knowledge_sharing_book.no_owner": "You cannot gain knowledge from an unowned book.",
"item.projectexpansion.alchemical_book": "Alchemical Book",
"item.projectexpansion.magnum_star_ein": "Magnum Star Ein",
"item.projectexpansion.magnum_star_zwei": "Magnum Star Zwei",
"item.projectexpansion.magnum_star_drei": "Magnum Star Drei",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.math.BigInteger;
import java.util.List;

@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -53,6 +54,9 @@ public void appendHoverText(ItemStack stack, @Nullable BlockGetter level, List<C
super.appendHoverText(stack, level, list, flag);
list.add(Lang.Blocks.COLLECTOR_TOOLTIP.translateColored(ChatFormatting.GRAY));
list.add(Lang.Blocks.COLLECTOR_EMC.translateColored(ChatFormatting.GRAY, EMCFormat.getComponent(getMatter().getCollectorOutputForTicks(Config.tickDelay.get())).setStyle(ColorStyle.GREEN)));
if(stack.getCount() > 1) {
list.add(Lang.Blocks.COLLECTOR_STACK_EMC.translateColored(ChatFormatting.GRAY, EMCFormat.getComponent(getMatter().getCollectorOutputForTicks(Config.tickDelay.get()).multiply(BigInteger.valueOf(stack.getCount()))).setStyle(ColorStyle.GREEN)));
}
list.add(Lang.SEE_WIKI.translateColored(ChatFormatting.AQUA));
}

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

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.math.BigInteger;
import java.util.List;

@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -78,6 +79,9 @@ public void appendHoverText(ItemStack stack, @Nullable BlockGetter level, List<C
super.appendHoverText(stack, level, list, flag);
list.add(Lang.Blocks.POWER_FLOWER_TOOLTIP.translateColored(ChatFormatting.GRAY, Component.literal(Config.tickDelay.get().toString()).setStyle(ColorStyle.GREEN), Component.literal(Config.tickDelay.get() == 1 ? "" : "s").setStyle(ColorStyle.GRAY)));
list.add(Lang.Blocks.POWER_FLOWER_EMC.translateColored(ChatFormatting.GRAY, EMCFormat.getComponent(getMatter().getPowerFlowerOutput()).setStyle(ColorStyle.GREEN)));
if(stack.getCount() > 1) {
list.add(Lang.Blocks.POWER_FLOWER_STACK_EMC.translateColored(ChatFormatting.GRAY, EMCFormat.getComponent(getMatter().getPowerFlowerOutput().multiply(BigInteger.valueOf(stack.getCount()))).setStyle(ColorStyle.GREEN)));
}
list.add(Lang.SEE_WIKI.translateColored(ChatFormatting.AQUA));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public void appendHoverText(ItemStack stack, @Nullable Level level, List<Compone
Player player = getPlayer(stack);
list.add(Lang.Items.ALCHEMICAL_BOOK_BOUND_TO.translateColored(ChatFormatting.RED, player == null ? Component.literal(stack.getOrCreateTag().getString(TagNames.OWNER_NAME)).withStyle(ChatFormatting.DARK_AQUA) : player.getDisplayName().copy().withStyle(ChatFormatting.DARK_AQUA)));
}
list.add(Lang.SEE_WIKI.translateColored(ChatFormatting.AQUA));
}

public @Nullable ServerPlayer getPlayer(ItemStack stack) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class ItemFuel extends Item {
public ItemFuel(Fuel level) {
super(new Properties().tab(Main.tab).rarity(level.rarity));
this.level = level;

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public enum Blocks implements ILangEntry {
// Collector
COLLECTOR_TOOLTIP("collector", "tooltip"),
COLLECTOR_EMC("collector", "emc"),
COLLECTOR_STACK_EMC("collector", "stack_emc"),

// EMC Link
EMC_LINK_TOOLTIP("emc_link", "tooltip"),
Expand All @@ -98,6 +99,7 @@ public enum Blocks implements ILangEntry {
// Power Flower
POWER_FLOWER_TOOLTIP("power_flower", "tooltip"),
POWER_FLOWER_EMC("power_flower", "emc"),
POWER_FLOWER_STACK_EMC("power_flower", "stack_emc"),

// Relay
RELAY_TOOLTIP("relay", "tooltip"),
Expand Down

0 comments on commit 7618b38

Please sign in to comment.