Skip to content

NOVA-Energy Implementation#3

Open
ExE-Boss wants to merge 2 commits into
masterfrom
update
Open

NOVA-Energy Implementation#3
ExE-Boss wants to merge 2 commits into
masterfrom
update

Conversation

@ExE-Boss

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

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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

Comment thread src/main/java/nova/energy/Unit.java Outdated
/**
* 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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