AIOT Botania

AIOT Botania

24M Downloads

Refactor and clean up

derkalaender opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.
There's lots of duplicate code (e.g. ToolUtil), a lot of unnecessary code in general, whilst better solutions are available. That would also solve problems like mod support, wrong block breaking speeds, not supported functions etc.

Describe the solution you'd like
Refactor, refactor, refactor.

  • There should be a file for static references to Botania's tools, so you redirect actions to those, instead of duplicating code from those classes
  • ItemAIOTBase should then store these references in a list and forward the applicable action to one item in that list according to priority/condition
  • Generate livingrock and livingwood items by using a base class and passing values (right now: a lot of files with only a few statements -> should deduplicate/decouple)
  • Remove LibMisc. It's confusing 5621ac8
  • Make use of proxies (would solve the client <-> server issues) and move specific functions to them 2e45da5
  • Make use of Java 8 Streams API, thus preventing endless if statements and overhead in general
  • Comment a lot more
  • Probably other stuff as well

Describe alternatives you've considered
- / -

commented

Sometimes. Maybe. But I don't like that it's an open issue. I will improve it step by step.