Portable Holes

Portable Holes

4.3k Downloads

Hey there

PulseBeat02 opened this issue ยท 0 comments

commented

Hey Malek! Long time no see. Figured that I would give you some tips perhaps on the project. It looks damn nice right now!

  • For naming conventions, try to name packages better. For example, instead of naming a package "screen_stuff", name it more like just "screen". Then name each of the individual packages inside something more detailed, like "screenhandler" and etc.
  • In this class, you got some pretty serious static abuse going on here that should be fixed. Instead of spamming static for a ton of those variables, remove the static modifier from them and retain them to their own instance instead. Then, use a getter for them.
  • In that same class, for all the ConfiguredFeature, consider using an actual enum instead so it is more clear and readable.
  • For your utility classes, make sure they are all marked with final and have a private constructor. For example, like this:
public final class VideoUtils {
    private VideoUtils() {}
   
    public static methodOne() {..}
}

It is a general good convention for utility classes.

  • For this class, please use dependency injection instead of static abuse. I am referring to the BlockRenderLayerMap.INSTANCE part. For example, pass the BlockRenderLayerMap instance into the constructor of your class. As an example, take a look at this class from my media library. Notice that I use the constructor to pass an instance instead of using static.
  • That's some of the stuff which can be improved. Perhaps more things is using better abstraction. If you need some examples for that take a look here.