-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOVA-Energy Implementation #3
base: master
Are you sure you want to change the base?
Conversation
public static final Unit WATT = getOrCreateUnit("nova:watt", "Watt", "W"); | ||
public static final Unit WATT_HOUR = getOrCreateUnit("nova:watt_hour", "Watt Hour", "Wh"); | ||
public static final Unit RESISTANCE = getOrCreateUnit("nova:resistance", "Ohm", "R"); | ||
public static final Unit CONDUCTANCE = getOrCreateUnit("nova:conductance", "Siemen", "S"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not resistance here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because that's how Calclavia made it in calclavia/Electrodynamics
/** | ||
* Redstone Flux, the default energy unit in Minecraft Forge since 1.10-ish. | ||
*/ | ||
public static final Unit REDFLUX = getOrCreateUnit("forge:redstone_flux", "Redstone-Flux", "RF").setPlural("Redstone-Flux"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use the constructor which takes a plural here?
static { | ||
registerConversion(Unit.ELECTRICAL_UNITS, Unit.JOULE, 40d/1d); | ||
registerConversion(Unit.REDFLUX, Unit.JOULE, 24/5d); | ||
registerConversion(Unit.MINECRAFT_JOULES, Unit.JOULE, 40d/3d/1d); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't 40d/3d/1d
the same as (40d/3d)/1d
which is the same as 40d/3d
?
|
||
// This should also happen automatically | ||
registerConversion(Unit.ELECTRICAL_UNITS, Unit.REDFLUX, 3d/25d); | ||
registerConversion(Unit.ELECTRICAL_UNITS, Unit.MINECRAFT_JOULES, 3d/1d); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3d/1d
is the same as 3d
.
// This should also happen automatically | ||
registerConversion(Unit.ELECTRICAL_UNITS, Unit.REDFLUX, 3d/25d); | ||
registerConversion(Unit.ELECTRICAL_UNITS, Unit.MINECRAFT_JOULES, 3d/1d); | ||
registerConversion(Unit.REDFLUX, Unit.MINECRAFT_JOULES, 25d/1d); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
This PR contains my implementation of NOVA-Energy, based off the calclavia/Electrodynamics implementation with my own changes and improvements.
To do:
Unit
to CoreMoved from #2