
Anagkai
Members-
Posts
40 -
Joined
-
Last visited
Everything posted by Anagkai
-
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:
-
@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 ... ?
-
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?
Anagkai replied to Hekaryn's topic in Modder Support
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. -
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".
-
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)
-
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...
-
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.
-
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.
-
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.
-
Does this method go into the registry handler and I call it in #onItemRegister? And do I even need a ModItems class?
-
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?
-
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
-
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)
-
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:
-
No. It wasn't in the selection of files available and I also thought there was something going profoundly wrong. But if I can just set it there, I'll do it. What would be the correct path in this case?
-
Here you go: https://imgur.com/a/VoZ5ni5
-
When I try to run minecraft in eclipse this doesn't work ("Main file is not set"). I've set up eclipse many times before and I never had this problem. I had a look at this thread: https://www.minecraftforge.net/forum/topic/44758-how-to-run-minecraft-from-eclipse/ but none of the setup commands proposed fixed the problem, although they all stated "BUILD SUCCESSFUL". I'm using Forge 1.12 and Eclipse Mars. Any help is appreciated. Thanks in advance.
-
The old method for registering entities doesn't work any more. I saw there was a new method that which takes a Resource Location. I was wondering, if someone could tell me, what kind of ResourceLocation I need and if there is anything else I need to pay attention to. Obviously I know I should use the Registry Events but I'm kinda lazy and I'll have to write everything from scratch anyway when forge is done. Anyway, if someone can link me on a write-up or example on the entity registry, I'll happily take that, too. EntityRegistry.registerModEntity(EntityGargoyle.class, "biodiversityGargoyle", 0, Biodiversity.MODID, 128, 1, true, 0x262626, 0x666666); One other random question: How does the setting of spawner base logic work nowadays? Not like this (there is a Resource Location missing as well). if(ConfigHandler.genvespiaryspawner){ TileEntityMobSpawner tileEntity = (TileEntityMobSpawner) world.getTileEntity(new BlockPos((i + 4), (j + 1), (k + 4))); if (tileEntity != null) { (tileEntity).getSpawnerBaseLogic().setEntityId("biodiversity.biodiversityWasp"); } Any help is appreciated. Thanks in advance.
-
Maybe you used the wrong constructor for the axe. If the other tools work fine.
-
Custom fluid isn't rendered and can't be picked up with a bucket
Anagkai replied to Anagkai's topic in Modder Support
Is there a howtwo somewhere for making a repository? I have no idea on how to do it... -
Custom fluid isn't rendered and can't be picked up with a bucket
Anagkai replied to Anagkai's topic in Modder Support
There is my fluid class and the blockstates file in the original post. Ther is the implementation of the StateMapper that I just posted. And there is the error from the log. What else do you need to look at? -
Custom fluid isn't rendered and can't be picked up with a bucket
Anagkai replied to Anagkai's topic in Modder Support
In the client proxy. -
Custom fluid isn't rendered and can't be picked up with a bucket
Anagkai replied to Anagkai's topic in Modder Support
Normally my blocks are defined and registered in my block registry class. If I want to use it for anything I can call BlocksBiodiversity.blockXYZ. This block is registered in the my fluids class. The only thing I could get from there that didn't give a compilation error was BiodiversityFluids.BlockMercury.instance. BUT I don't think that it's right, because the state mapper doesn't work (there's still the same error in the console) even though I did it like any other state mapper before. And all these do work... That's the code of the state mapper. Builder builder6 = new StateMap.Builder(); builder6.ignore(BiodiversityFluids.BlockMercury.LEVEL); IStateMapper mapper6 = builder6.build(); ModelLoader.setCustomStateMapper(BiodiversityFluids.BlockMercury.instance, mapper6); -
Custom fluid isn't rendered and can't be picked up with a bucket
Anagkai replied to Anagkai's topic in Modder Support
I tried registering a StateMap to ignore it, but I couldn't because I wasn't able to find out what name the fluid block goes by. How I can find it out?