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

Make the Neutron Activator UI always report kinetic energy in MeV. #253

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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