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

Spatial rework #3048

Merged
merged 19 commits into from Aug 24, 2017

Conversation

Projects
None yet
3 participants
@fscan
Member

fscan commented Aug 19, 2017

Rework how spatial io works. Use one big dimension instead of one dimension per cell. Also some fixes :)

@@ -128,6 +129,7 @@
final class Registration

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

MAJOR Add a constructor to the class. rule

@orod-org

orod-org Aug 19, 2017

MAJOR Add a constructor to the class. rule

@@ -45,6 +46,8 @@ private Capabilities()
public static Capability<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR;
public static Capability<ISpatialDimension> SPATIAL_DIMENSION;

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

MINOR Rename this field "SPATIAL_DIMENSION" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule
MINOR Make this "public static SPATIAL_DIMENSION" field final rule
MINOR Move this variable to comply with Java Code Conventions. rule
MINOR Make SPATIAL_DIMENSION a static final constant or non-public and provide accessors if needed. rule

@orod-org

orod-org Aug 19, 2017

MINOR Rename this field "SPATIAL_DIMENSION" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule
MINOR Make this "public static SPATIAL_DIMENSION" field final rule
MINOR Move this variable to comply with Java Code Conventions. rule
MINOR Make SPATIAL_DIMENSION a static final constant or non-public and provide accessors if needed. rule

@@ -45,6 +46,8 @@ private Capabilities()
public static Capability<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR;
public static Capability<ISpatialDimension> SPATIAL_DIMENSION;
public static Capability<ITeslaConsumer> TESLA_CONSUMER;

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

MINOR Make TESLA_CONSUMER a static final constant or non-public and provide accessors if needed. rule

@orod-org

orod-org Aug 19, 2017

MINOR Make TESLA_CONSUMER a static final constant or non-public and provide accessors if needed. rule

@@ -45,6 +46,8 @@ private Capabilities()
public static Capability<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR;
public static Capability<ISpatialDimension> SPATIAL_DIMENSION;
public static Capability<ITeslaConsumer> TESLA_CONSUMER;
public static Capability<ITeslaHolder> TESLA_HOLDER;

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

MINOR Make TESLA_HOLDER a static final constant or non-public and provide accessors if needed. rule

@orod-org

orod-org Aug 19, 2017

MINOR Make TESLA_HOLDER a static final constant or non-public and provide accessors if needed. rule

@@ -45,6 +46,8 @@ private Capabilities()
public static Capability<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR;

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

MINOR Make STORAGE_MONITORABLE_ACCESSOR a static final constant or non-public and provide accessors if needed. rule

@orod-org

orod-org Aug 19, 2017

MINOR Make STORAGE_MONITORABLE_ACCESSOR a static final constant or non-public and provide accessors if needed. rule

}
@Override
public void deleteCellDimension( int cellStorageId )

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

CRITICAL Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation. rule

@orod-org

orod-org Aug 19, 2017

CRITICAL Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation. rule

return new BlockPos( posx, 64, posz );
}
private void clearCellArea( int cellId, StorageCellData cell )

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

MAJOR Remove this unused method parameter "cellId". rule

@orod-org

orod-org Aug 19, 2017

MAJOR Remove this unused method parameter "cellId". rule

private void clearCellArea( int cellId, StorageCellData cell )
{
// TODO reset chunks?

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

INFO Complete the task associated to this TODO comment. rule

@orod-org

orod-org Aug 19, 2017

INFO Complete the task associated to this TODO comment. rule

{
destination = this.createNewWorld( is );
}
if( targetX <= maxSize && targetY <= maxSize && targetZ <= maxSize )

This comment has been minimized.

@orod-org

orod-org Aug 19, 2017

CRITICAL Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@orod-org

orod-org Aug 19, 2017

CRITICAL Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@yueh yueh added this to the rv5.alpha - 1.12 milestone Aug 20, 2017

private static final String NBT_DIM_Y_KEY = "dim_y";
private static final String NBT_DIM_Z_KEY = "dim_z";
public BlockPos contentDimension;

This comment has been minimized.

@orod-org

orod-org Aug 20, 2017

MINOR Make contentDimension a static final constant or non-public and provide accessors if needed. rule

@orod-org

orod-org Aug 20, 2017

MINOR Make contentDimension a static final constant or non-public and provide accessors if needed. rule

private static final String NBT_DIM_Z_KEY = "dim_z";
public BlockPos contentDimension;
public int owner;

This comment has been minimized.

@orod-org

orod-org Aug 20, 2017

MINOR Make owner a static final constant or non-public and provide accessors if needed. rule

@orod-org

orod-org Aug 20, 2017

MINOR Make owner a static final constant or non-public and provide accessors if needed. rule

StoredSize,
CellId,

This comment has been minimized.

@orod-org

orod-org Aug 20, 2017

CRITICAL Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule

@orod-org

orod-org Aug 20, 2017

CRITICAL Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule

@orod-org

This comment has been minimized.

Show comment
Hide comment
@orod-org

orod-org Aug 20, 2017

SonarQube analysis reported 31 issues

  • CRITICAL 5 critical
  • MAJOR 7 major
  • MINOR 18 minor
  • INFO 1 info

Watch the comments in this conversation to review them.

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL GuiText.java#L120: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  2. CRITICAL GuiText.java#L121: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  3. MAJOR Registration.java#L152: This block of commented-out lines of code should be removed. rule
  4. MAJOR Registration.java#L240: Remove this useless assignment to local variable "partHelper". rule
  5. MAJOR Registration.java#L249: This block of commented-out lines of code should be removed. rule
  6. MAJOR Registration.java#L346: This block of commented-out lines of code should be removed. rule
  7. MAJOR Registration.java#L472: This block of commented-out lines of code should be removed. rule
  8. MINOR Capabilities.java#L55: Rename this field "FORGE_ENERGY" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule
  9. MINOR Capabilities.java#L55: Make this "public static FORGE_ENERGY" field final rule
  10. MINOR Capabilities.java#L55: Move this variable to comply with Java Code Conventions. rule

orod-org commented Aug 20, 2017

SonarQube analysis reported 31 issues

  • CRITICAL 5 critical
  • MAJOR 7 major
  • MINOR 18 minor
  • INFO 1 info

Watch the comments in this conversation to review them.

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL GuiText.java#L120: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  2. CRITICAL GuiText.java#L121: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  3. MAJOR Registration.java#L152: This block of commented-out lines of code should be removed. rule
  4. MAJOR Registration.java#L240: Remove this useless assignment to local variable "partHelper". rule
  5. MAJOR Registration.java#L249: This block of commented-out lines of code should be removed. rule
  6. MAJOR Registration.java#L346: This block of commented-out lines of code should be removed. rule
  7. MAJOR Registration.java#L472: This block of commented-out lines of code should be removed. rule
  8. MINOR Capabilities.java#L55: Rename this field "FORGE_ENERGY" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule
  9. MINOR Capabilities.java#L55: Make this "public static FORGE_ENERGY" field final rule
  10. MINOR Capabilities.java#L55: Move this variable to comply with Java Code Conventions. rule

@yueh yueh merged commit bbf4d4a into AppliedEnergistics:rv5-1.12 Aug 24, 2017

2 of 3 checks passed

sonarqube SonarQube reported 31 issues, with 5 critical
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment