Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/16/17 in all areas

  1. @DifferentiationWell, the thing with Minecraft is that it was developed over several years by programmers who were not really professional programmers. That is actually part of its charm. However, from programming practice point of view they do a lot of "bad habits" -- in this case there is a lack of "encapsulation". Your question highlights the problem with lack of encapsulation. Basically, the scope of fields and availability of setter and getter functions is very inconsistent. "Properly" speaking, motionX, Y and Z and other fields shouldn't be publicly accessible. Rather there should be setters and arguably probably just vector type ones. It is a lot "safer" to have setters because then you can add data validation, and also it allows control over if and when changes can be made. You'll often find weird code in the Minecraft source that is due to lack of encapsulation. In particular you'll see all sorts of data validation sprinkled around. You'll also find other things like methods and fields that have essentially been abandoned -- not used in any meaningful way. Anyway, it is just part of the charm of modding. However, I do have one warning -- when calling vanilla methods or accessing vanilla fields always check carefully how they are used in the rest of the Minecraft code. You'll frequently find that a method that you think does something doesn't really do what you think, and you'll also get ideas about what sort of data validation might be needed when you use the method.
    2 points
  2. Nvm I see the problem. In your EnumHandler your not setting the name of the Enums to the value of name. Your not setting the size either, just the I'd.
    2 points
  3. You need to create a block state container. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/block/BlockAxel.java#L60-L63
    1 point
  4. ^ Rename your modId to firstforgemod instead of firstForgeMod; you're not allowed to use capital letters in your modId. Problem solved.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.