Posted June 2, 20187 yr So I am trying to add elements in the periodic table to Minecraft. For some reason, my tooltip for displaying the information about the element does not display the correct information. The item is ItemElement. The tooltip works for the atomic number, boiling point, and melting point, but not for mass or any of the other values (but i'm most concerned about the mass). I suspect the problem is coming from the items not being added to the NonNullList in the ElementUtil file. What is confusing me is the fact that some work and others don't. Any help would be appreciated! Github: https://github.com/hamhub7/LabDay ItemElement: https://github.com/hamhub7/LabDay/blob/master/src/main/java/com/hamhub7/labday/item/ItemElement.java ElementUtil: https://github.com/hamhub7/LabDay/blob/master/src/main/java/com/hamhub7/labday/util/ElementUtil.java
June 2, 20187 yr I don't see anything related to tooltips, mass or any other information in your ItemElement class. Are you sure you pushed your latest changes to GitHub? Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
June 2, 20187 yr Author I thought i did, but it didn't appear to have worked. Can you help me out with that?
June 2, 20187 yr Author 6 minutes ago, diesieben07 said: The text "mass" does not appear once in your item class. Where are you trying to add a tooltip for mass? Please link specific lines. https://github.com/hamhub7/LabDay/blob/master/src/main/java/com/hamhub7/labday/item/ItemElement.java#L78 I think the error is probably somewhere in here though https://github.com/hamhub7/LabDay/blob/master/src/main/java/com/hamhub7/labday/util/ElementUtil.java#L441
June 2, 20187 yr Author the init is called in the main class during the init registry. The problem is the large amount of elements (118) so all the elementutil file does is create lists to store all the data, which is then called by the tooltip and other things in the future. I dont know why the list for weight isn't working, because i almost copied and pasted the boiling/melting point one that works. Is there some sort of problem by using an integer instead of a float?
June 2, 20187 yr Author Well that’s a bit embarrassing. That’s the problem. Thanks, and I’ll try to clean up the class
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.