Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Neutron Activator UI always reports kinetic energy in MeV. (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdielKavash authored Apr 22, 2024
1 parent 0c6e1c7 commit e19432a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Add your dependencies here

dependencies {
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.151:dev')
api('com.github.GTNewHorizons:bartworks:0.9.19:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.155:dev')
api('com.github.GTNewHorizons:bartworks:0.9.21:dev')
implementation('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
implementation('com.github.GTNewHorizons:GTplusplus:1.11.53:dev')
implementation('com.github.GTNewHorizons:GTplusplus:1.11.57:dev')

compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.4-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.5-GTNH:dev') {transitive = false}

runtimeOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev')
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ public class NeutronActivator extends GT_MetaTileEntity_TooltipMultiBlockBase_EM
protected int height = 0;
protected int eV = 0, mCeil = 0, mFloor = 0;
private GT_Recipe lastRecipe;
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
protected static final NumberFormatMUI numberFormat;
static {
numberFormat = new NumberFormatMUI();
numberFormat.setMinimumFractionDigits(2);
numberFormat.setMaximumFractionDigits(2);
}
final XSTR R = new XSTR();

private static final IIconContainer textureFontOn = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_On");
Expand Down Expand Up @@ -451,7 +456,7 @@ protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inve
new TextWidget(StatCollector.translateToLocal("gui.NeutronActivator.0"))
.setDefaultColor(COLOR_TEXT_WHITE.get()))
.widget(
new TextWidget().setStringSupplier(() -> numberFormat.formatWithSuffix(eV) + "eV")
new TextWidget().setStringSupplier(() -> numberFormat.format(eV / 1_000_000d) + " MeV")
.setDefaultColor(COLOR_TEXT_WHITE.get())
.setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0))
.widget(new FakeSyncWidget.IntegerSyncer(() -> eV, val -> eV = val));
Expand Down

0 comments on commit e19432a

Please sign in to comment.