-
Items aren't correctly registered
I added a class level annotation but there's still something missing, it seems. I thought this meant, that I needed to register the event, but I'm not sure if it shouldn't be registered automatically... Anyway, this is the crash:
-
Items aren't correctly registered
@ObjectHolder("fluorite") public static Item fluorite; What I did looks like this. But the game crashes and the crash report says "PM Description: Initializing game java.lang.IllegalStateException: Unqualified reference to ObjectHolder" I don't see any reference to my code directly in the crash report, so I'm not sure where to look. Does this mean, I forgot an annotation or didn't I get one right, or ... ?
-
Items aren't correctly registered
I read the documentation but I'm not sure if I understood. From what I understood, I what define static fields for the items I need. And if I add the annotation I can just use the field? That's strange. I tried commenting out part of it but it seems none of them are okay. Maybe it's because of all the other errors.
-
How to change the way that an item appears on your hand?
Normally the appearance of items can easily be changed using the correct model json file. Just look at the models for the trident and help yourself.
-
Items aren't correctly registered
So the static field gets the annotation? And what would I put in the class using the item? The string behind @ObjectHolder? By doesn't like I mean it says "is not applicable for the arguments".
-
Items aren't correctly registered
First of all I have like 300 instances where things reference my items and I'm wondering how I would fix that with @ObjectHolder. For example, the following class references ItemsBiodiversity.beeQueen. What would I here? My other problem is, that my registerAll suddenly doesn't like it's arguments any more: (I removed most of the items for better readability)
-
Items aren't correctly registered
So the times are past where you just put blocks behind items... Duly noted. Could you point me to some example of implementation or similar? I don't really get the explanation on the ForgeDocs...
-
Items aren't correctly registered
Okay, so that is not basic enough for me. I use the method with the constructor, because I have multiple ore blocks and I didn't wanna create a class for each. How could I do that with the annotation? I admit, I don't even get where I need to put the annotation.
-
Items aren't correctly registered
1) Just noticed myself (I looked on the bottom because I normally do python). I just messed something up while refactoring. 2) I have no idea, why this was separate, probably something with readability. The way you wrote it, I don't define variables for the items. I mean I can just append that stuff to the new ItemWhatever, but what would I do if I want my gems falling out of blocks? Has this changed, too? I need the drop item for the constructor of my ore block... 3) Changed my mind. 4) I know basic Java, but I mostly I do Python.
-
Items aren't correctly registered
There's obviously something I didn't do right, because I get a NullPointerException: Here's the report, although I'm not sure, if someone get info out of it: Some other interesting questions would be how to call the #setItems which is now called #setAdditionalItemData now, because it needs to access the items: Also I think I need to change the model registering: I admit I don't understand all of this very well.
-
Items aren't correctly registered
Does this method go into the registry handler and I call it in #onItemRegister? And do I even need a ModItems class?
-
Items aren't correctly registered
1) setItems is a not so well named method doing some stuff (such as apply addInformation to multiple items) which I'm most certain is not relevant for the problem at hand. I promise to rename it, though. 2) & 3) I added the override and I will look into adding the modid to my things. 3) That is probably the issue. How would the event be called? EDIT: Just found this, do all the items need to go here?
-
Items aren't correctly registered
I updated my 1.10 code to 1.12 and basically just modified everything until it compiled, implementing the new method of item registration and whatnot. But there seems to be something profoundly wrong. 1) Items don't show up in the creative tab. 2) The block and item models aren't loaded. I'll just post the code that I think, is relevant, if it's something else please tell me. Any input on what to modify is greatly appreciated. ModItems class
-
Forge test run in eclipse doesn't work
Okay, I fixed it, although it was all a bit sketchy. First I thought, maybe my eclipse was to old, but getting a new one didn't help. Then I completely reinstalled Eclipse and Forge, which did help, but created new problems. You somehow couldn't start minecraft server (you need to accept an EULA which isn't there) and the Client only starts, when you first click on the project root folder)
-
[1.12] Registering non-trivial crafting recipe
I made a recipe in an older version that adds a string as NBT to tools. Right now I'm having a hard time updating the code to 1.12. Crafting recipes are now registered as json files, which is obviously not possible in a case like this. I have fourproblems that I can't figure out right now: 1) What code do I need to register the recipe? 2) In the recipe class I have an error on the return type of #getRemainingItems. What do I need to change there? 3) #getRecipeSize is apparently not a method of the implemented interface. So I still need this? 4) The interface implemented has got 4 new methods with return values that I have no idea what to make of. What do they need to return? Any help is appreciated. Thanks in advance. Registering: GameRegistry.addRecipe(new RecipeChecksum()); Recipe class:
IPS spam blocked by CleanTalk.