Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

NOVA-Energy Implementation #3

wants to merge 2 commits into from

Conversation

ExE-Boss
Copy link
Member

@ExE-Boss ExE-Boss commented Jan 14, 2017

This PR contains my implementation of NOVA-Energy, based off the calclavia/Electrodynamics implementation with my own changes and improvements.


To do:

  • Consider moving Unit to Core

Moved from #2

@ExE-Boss ExE-Boss self-assigned this Jan 14, 2017
@ExE-Boss ExE-Boss mentioned this pull request Jan 14, 2017
@ExE-Boss ExE-Boss requested a review from RX14 January 19, 2017 22:35
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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not resistance here?

Copy link
Member Author

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");
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants