AngleWyrm / Colonies

Minecraft mod MineColony Reboot
7 stars 8 forks source link

Remove author-named packages #102

Closed riking closed 11 years ago

riking commented 11 years ago

Author-named packages are totally unnecessary.

The structure has been modeled after Forge and Bukkit.

This code will not compile; imports still need to be fixed.

For the future, there are several useless classes (like RNG) that will need to be removed.

AngleWyrm commented 11 years ago

See issue #81, folder organization.

The purpose of author-named packages is work-in-progress developer workspace. Part of any and all creative endeavors is the generation of garbage. There are quite a few files in developer folders that represent dead code, and resources that either have no use yet, or may never have a use.

The proposed move causes all of those "It could be valuable one day" type pieces of source code and other resources to appear in the main folders, and as such is not a good idea.

I'll refactor much of the source that is currently a working part of the mod to colonies/src today.

AngleWyrm commented 11 years ago

PS: you might inspect the file RNG.java https://github.com/AngleWyrm/Colonies/blob/master/anglewyrm/src/RNG.java It's used in Utility.java https://github.com/AngleWyrm/Colonies/blob/master/anglewyrm/src/Utility.java

It provides a mod-wide random number generator that has an additional function, nextRadian() Utility.rng.nextRadian() is used in several search functions in the AI modules.

riking commented 11 years ago

May I suggest the use of branches for testing projects?

riking commented 11 years ago

I did in fact inspect RNG.java. It is an extension of Random, only providing one additional function.

return nextFloat()*2.0f * (float)Math.PI;

This would be better implemented as a static function in another class.

AngleWyrm commented 11 years ago

Perhaps you could say why another class would be better, and which class that would be?

riking commented 11 years ago

It would be better because you're not creating a whole new class for one piece of functionality