Formatting and code readability cleanup (#5467)

* First pass reformatting code to be more readable (common still not done)

* Replace google common collect calls with Java calls where possible

* Remove a bunch of unnecessary parenthesis leaving clarifying ones

* Add some missing @Nonnull annotations

* Fix checking wrong type

* Remove unnecessary continue/return statements and simplify comparision check

* Pass exception instead of directly printing stack trace

* Work on cleaning up common, through config so far

* Work on cleaning up common, through integration so far

* Work on cleaning up common, through network so far

* Work on cleaning up common, through tier so far

* Remove empty constructors that get created by default anyways

* Work on cleaning up common, through transmitters so far

* Work on cleaning up common, through utils so far

* Finish cleaning up spacing for common
This commit is contained in:
Richard Freimer authored and GitHub committed 2019-05-11 14:13:24 -04:00
1 parent 91ef2a5c3d
commit 0d4b50908f
909 files changed
+6234 -15623

No files matched your search

+10 -13
View File
@@ -13,10 +13,10 @@ public interface IToolHammer {
/**
* Called to ensure that the tool can be used on a block.
*
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other
* tools).
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools).
* @param user The entity using the tool.
* @param pos Coordinates of the block.
* @param pos Coordinates of the block.
*
* @return True if this tool can be used.
*/
boolean isUsable(ItemStack item, EntityLivingBase user, BlockPos pos);
@@ -24,10 +24,10 @@ public interface IToolHammer {
/**
* Called to ensure that the tool can be used on an entity.
*
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other
* tools).
* @param user The entity using the tool.
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools).
* @param user The entity using the tool.
* @param entity The entity the tool is being used on.
*
* @return True if this tool can be used.
*/
boolean isUsable(ItemStack item, EntityLivingBase user, Entity entity);
@@ -35,21 +35,18 @@ public interface IToolHammer {
/**
* Callback for when the tool has been used reactively.
*
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other
* tools).
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools).
* @param user The entity using the tool.
* @param pos Coordinates of the block.
* @param pos Coordinates of the block.
*/
void toolUsed(ItemStack item, EntityLivingBase user, BlockPos pos);
/**
* Callback for when the tool has been used reactively.
*
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other
* tools).
* @param user The entity using the tool.
* @param item The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools).
* @param user The entity using the tool.
* @param entity The entity the tool is being used on.
*/
void toolUsed(ItemStack item, EntityLivingBase user, Entity entity);
}
@@ -9,4 +9,4 @@ public interface IEntityBreathable {
* Whether or not this entity can currently breathe without oxygen in it's vicinity
*/
boolean canBreath();
}
}
@@ -3,8 +3,7 @@ package micdoodle8.mods.galacticraft.api.world;
/**
* Used to change the solar multiplier of certain world providers
* <p/>
* If you have a solar feature in your mod, check whether the world's provider inherits this class and multiply the
* solar generation by the solar multiplier double
* If you have a solar feature in your mod, check whether the world's provider inherits this class and multiply the solar generation by the solar multiplier double
* <p/>
* for example:
* <p/>
@@ -13,4 +12,4 @@ package micdoodle8.mods.galacticraft.api.world;
public interface ISolarLevel {
double getSolarEnergyMultiplier();
}
}