Skip to content

Commit

Permalink
Use getters for getting matter tier
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Feb 4, 2023
1 parent ee84f23 commit a16ce3d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public TileEntity createTileEntity(BlockState state, IBlockReader world) {
public void appendHoverText(ItemStack stack, @Nullable IBlockReader level, List<ITextComponent> list, ITooltipFlag flag) {
super.appendHoverText(stack, level, list, flag);
list.add(new TranslationTextComponent("block.projectexpansion.collector.tooltip").setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.collector.emc", EMCFormat.getComponent(matter.getCollectorOutputForTicks(Config.tickDelay.get())).setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.collector.emc", EMCFormat.getComponent(getMatter().getCollectorOutputForTicks(Config.tickDelay.get())).setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("text.projectexpansion.see_wiki").setStyle(ColorStyle.AQUA));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public TileEntity createTileEntity(BlockState state, IBlockReader world) {
public void appendHoverText(ItemStack stack, @Nullable IBlockReader level, List<ITextComponent> list, ITooltipFlag flag) {
super.appendHoverText(stack, level, list, flag);
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.tooltip").setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.limit_items", matter.getEMCLinkItemLimitComponent()).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.limit_fluids", matter.getEMCLinkFluidLimitComponent()).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.fluid_export_efficiency", new StringTextComponent(matter.getFluidEfficiencyPercentage() + "%").setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.limit_emc", matter.getEMCLinkEMCLimitComponent()).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.limit_items", getMatter().getEMCLinkItemLimitComponent()).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.limit_fluids", getMatter().getEMCLinkFluidLimitComponent()).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.fluid_export_efficiency", new StringTextComponent(getMatter().getFluidEfficiencyPercentage() + "%").setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.emc_link.limit_emc", getMatter().getEMCLinkEMCLimitComponent()).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("text.projectexpansion.see_wiki").setStyle(ColorStyle.AQUA));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public VoxelShape getShape(@Nonnull BlockState state, @Nonnull IBlockReader worl
public void appendHoverText(ItemStack stack, @Nullable IBlockReader level, List<ITextComponent> list, ITooltipFlag flag) {
super.appendHoverText(stack, level, list, flag);
list.add(new TranslationTextComponent("block.projectexpansion.power_flower.tooltip", new StringTextComponent(Config.tickDelay.get().toString()).setStyle(ColorStyle.GREEN), new StringTextComponent(Config.tickDelay.get() == 1 ? "" : "s").setStyle(ColorStyle.GRAY)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.power_flower.emc", EMCFormat.getComponent(matter.getPowerFlowerOutput()).setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.power_flower.emc", EMCFormat.getComponent(getMatter().getPowerFlowerOutput()).setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("text.projectexpansion.see_wiki").setStyle(ColorStyle.AQUA));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public TileEntity createTileEntity(BlockState state, IBlockReader world) {
public void appendHoverText(ItemStack stack, @Nullable IBlockReader level, List<ITextComponent> list, ITooltipFlag flag) {
super.appendHoverText(stack, level, list, flag);
list.add(new TranslationTextComponent("block.projectexpansion.relay.tooltip").setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.relay.bonus", EMCFormat.getComponent(matter.getRelayBonusForTicks(Config.tickDelay.get())).setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.relay.transfer", matter.getRelayTransferComponent().copy().setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.relay.bonus", EMCFormat.getComponent(getMatter().getRelayBonusForTicks(Config.tickDelay.get())).setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("block.projectexpansion.relay.transfer", getMatter().getRelayTransferComponent().copy().setStyle(ColorStyle.GREEN)).setStyle(ColorStyle.GRAY));
list.add(new TranslationTextComponent("text.projectexpansion.see_wiki").setStyle(ColorStyle.AQUA));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private double getFluidCostPer() {
long fullCost = ProjectEAPI.getEMCProxy().getValue(itemStack);
long bucketCost = ProjectEAPI.getEMCProxy().getValue(Items.BUCKET);
if(bucketCost == 0 && fullCost == 0) return 0D;
return (fullCost - ((bucketCost * matter.getFluidEfficiencyPercentage()) / 100F)) / 1000D;
return (fullCost - ((bucketCost * getMatter().getFluidEfficiencyPercentage()) / 100F)) / 1000D;
} catch(ArithmeticException ignore) {
return Long.MAX_VALUE;
}
Expand Down

0 comments on commit a16ce3d

Please sign in to comment.