Jump to content

That_Martin_Guy

Members
  • Posts

    197
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by That_Martin_Guy

  1. I thought that I would be able to make some sort of wildcard version of the object, but I can see now that this doesn't really make sense. Works now! Thanks. Working ModBlocks
  2. BlockBase (which BlockHardenedOre inherits from) sets the registry name in it's constructor as the first parameter like this: public BlockBase(String name, @Nullable CreativeTabs creativeTab, Material materialIn) { ... this.setName(name); ... } private void setName(String name) { this.setRegistryName(name); super.setUnlocalizedName(this.getRegistryName().toString()); } . So in this case the hardened coal's registry name is blockhardenedcoal. Is this incorrect?
  3. Right now I crash with a NullPointerException, and I'm confused as to why. Shouldn't the field be occupied by the time the item registry event is fired? ModBlocks
  4. Then how do I instantiate it this way? As far as I can tell the docs only tell you how to annotate a class or field properly, not how to instantiate it.
  5. How do I instantiate it if the field is null? I want to have multiple instances of BlockHardenedOre with different values in its constructor.
  6. I haven't used ObjectHolders before, but I've seen a lot of people both use and recommend them, so I tried to use them myself. I am not very experienced with these, though, and I am currently crashing with an IllegalStateException. Crash log ModBlocks ModItems The linked files are the only files containing the ObjectHolder annotation.
  7. How do I change it? I'm on windows 7. EDIT: Nevermind. I used google. Works now.
  8. I'm trying to compile my mod with gradlew build, but it fails when compiling. Log I have no clue why this is happening, it worked fine yesterday. I do have a JDK properly installed before you ask.
  9. My gui contains 5 text fields. Since having to click them all manually is tedious (at least to me) I figured I should implement some quality of life improvements. It currently looks like this. Currently they all have the focused color, even though they aren't. On top of fixing this bug, in the end I want them to have the following functionality; - Being able to tab through the text fields, in the same order you read - When tabbed to, the text will be highlighted, allowing you to clear it - Right clicking the fields clear them My gui class I tried to implement the right click functionality, but doing that does absolutely nothing (it doesn't even focus them).
  10. You cannot edit minecraft's files in forge, since it is much simpler to make mods compatible with each other that way. Also I don't think there is a way to have them in the same package like that, but I'm not sure since I don't use eclipse.
  11. Thank you! Works wonderfully!
  12. Do I need to update the mappings value? Didn't seem to work without it. Got the same error still. New build.gradle EDIT: And yes I did remove the .gradle folder
  13. I have want to update my mod from 1.11.2 to 1.12. I tried to change the minecraft version field in my build.gradle, but when I run gradlew clean setupDecompWorkspace it fails and says the following: * What went wrong: Execution failed for task ':fixMcSources'. > com.cloudbees.diff.PatchException: Cannot find hunk target Here is my build.gradle. I cannot give you the whole log. It is 42598 lines long and 1.9 mb big, and therefore cannot show it on any code sharing site I know of.
  14. Am I able/required to store it in an nbt? If so, how?
  15. I was wondering if it is possible to use classes in capabilities, or store it on the player in another fashion. The class will contain lists, objects that aren't related to vanilla minecraft, and several methods, and, in summary, a lot of non-prime variables.
  16. Is there any rule of thumb for when to take the latest version of forge vs the recommended? I know that when forge was released for 1.12 it was initially very unstable, it was updated constantly etc. But now things have settled down, and, according the devs, the 1.12 versions are now, generally speaking, stable. But which do I pick if I want to create a mod?
  17. Very true, didn't think about that. Thanks again!
  18. Ah, thank you for the heads up! That's much simpler than setting up an entire capability system. Thanks!
  19. I already open it via a custom packet. Do I need to do anything else other than the usual packet handling you do with capabilities?
  20. Seems like the best solution. Really the last thing I would think of, but probably the best one for my situation. Thanks!
  21. In a list stored in a tile entity. The way I want to do this is to call the method getRandomCard, but if I called it every time I opened the gui it would get a different card. This is not what I want since I have a list of players that are supposed to get the same card, and if I got a random card every time I opened the gui they would get different ones.
  22. I have a gui that needs to have an EntityPlayer and an ItemStack passed into its constructor to work properly. The problem is that I don't know how to do this in a GuiHandler. I'm having trouble describing it, but I cannot get this value from any of the parameters passed into getClientGuiElement. Feel free to ask for code, I just don't really know what to show you currently.
  23. Ah, there is the problem! I had made BlockQuizBox return true on onBlockActivated if it had a tile entity in it, which it should always have. Therefore it made it not call onItemRightClick, which in turn made it not bind the microphone to the block. Thank you!
  24. I think I have found the problem, or atleast something related to the problem. onItemUse isn't called when right clicked on a quiz box. Say, what does the return of onBlockActivated do?
×
×
  • Create New...

Important Information

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