Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. The HashSet class is filled with Javadoc. I would suggest getting familiar with your IDE. If you are referring to passing the set into the constructor, then you can pass in a set directly (instead of creating a field). However this depends on if you are going to reuse it.
  2. It seems like you are unfamiliar with Java. Please learn Java before making a mod (generics, inheritance, etc).
  3. You are not supposed to access the World in readFromNBT. The world is can be uninitialized at that time. Like the name suggests, you should only read data from NBT during that time. If you want to get another tile entity during initialization, you can make it a lazy value and initialize (when first used/first tick in world depending on how you want to use it) based on the BlockPos (which is read from NBT).
  4. There is no way to tell which is better without benchmarking your specific device. More cores doesn’t necessarily means better handling of more threads. Check out how context switch works.
  5. Try not using the same block state for rendering multiple blocks. Create a new one (via getDefaultState) each time.
  6. I would recommend looking at sources of other mods. I used to learn modding via looking at Botania, which provides a pretty good example of various systems (particles, recipes, etc). I personally find examples of Forge API not as necessary as code examples in other API/framework, as the vanilla code serves as a pretty good example itself. However, if you prefer examples, TGG has a tutorial consisting of examples: here.
  7. It doesn't fulfill your need, since it doesn't update when the middle item changes. I would say that since anvil is almost never used without a middle item (renaming is its own case), it would bring extra fuss (unnecessary event subscriber calls) to fire the event subscriber when the middle item changes. It can be made to do stuff without a center item, but it shouldn't design-wise IMO. However you could propose a PR and see what others think.
  8. No. Your problem is not remotely related to the mod loader (it happens in-game, and have nothing to do with mod loading).
  9. Please read the EAQ and post logs. I would also suggest to not use cape mod.
  10. Try removing all your mods. Does this still happen?
  11. You might want to get familiar with Google. I can find at least 20 tutorials online with a simple Google search.
  12. I’m pretty sure that the anvil is supposed to work that way (with a center item, since the anvil combines the two). If you want a crafting method that turns one item into another at the cost of experience, you should make a custom crafting block instead.
  13. Please post your code (the entire class). I don’t think you need anything “half” in stairs.
  14. What are you trying to create?
  15. Try looking at vanilla examples of slabs first.
  16. That method never cause this exception. There is no point in adding it here. Even if some of your code might cause this, you should handle it inside the method properly (you are making a mod, not an API). LivingDamageEvent is a Forge event. You are putting it in the Mod event subscriber.
  17. Please read the EAQ and post the debug.log.
  18. You need to post a proper Gradle repo, as otherwise other people cannot debug it. As for your mod, I would suggest starting off with a simple mod that adds a few items/blocks first before tackling a gun mod. It seems that what you are trying to do is beyond your knowledge of modding, and therefore is hard for you to do everything at once. A less steep learning curve would suit you better (start with adding items, then adding functionalities to them, then learn about sides and networking, then entities, etc).
  19. I would say that in terms of actual rendering, you just need to be familiar with OpenGL. The non-generic part of rendering are mostly changes in the particle system and rendering system, which is not that huge of a deal to adapt to when Forge updates (might takes a few days to learn, but you will get there). Other than that, just check out the vanilla rendering examples (including usage of buffer builder, tessellator, etc) as well as the documentations on the model system. These change a lot between Forge versions. As for LTS, modders took a vote on that and 1.14 is preferred by most people. Modern versions of Minecraft is actually more stable and have better performance (compare the code with, say, 1.7.10). A lot of popular mods in 1.7.10 and 1.12.2 are rather... terribly written in terms of code (check their sources; most of them are open sourced). There isn’t any reason to not move on to newer versions apart from the large player base (which eventually moves on to newer versions anyways).
  20. Forge does not work with Window 10 Edition; it is designed for the Java Edition only.
  21. I'll triple that; the rendering has changed drastically in recent versions of Forge. It might be easier for you to rewrite the mod from scratch rather than updating it, which would require proper programming in Java (there is no "quick tools/ways" for updating mod, and videos on YouTube who claim they can "quickly" update any mod from any version is nonsense). There will be a lot of learning before you can successfully port the mod. This is no discouragement though; we encourage you to learn modding and programming, and use your knowledge to port the mod. After you are done with learning the basics, I would suggest checking out the model system of Forge: https://mcforge.readthedocs.io/en/1.15.x/models/introduction/.
×
×
  • Create New...

Important Information

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