Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. Adding @Override only tells your IDE that you intend to override a method. It does not have any affect of the flow of a program.
  2. The code on GitHub is only your mod’s code. None of the required libraries or the prerequisites for launching minecraft + the mod are on the mod’s GitHub. The gradle tasks downloads and sets up the environment for you to make the mod. IntelliJ has an integrated terminal, you could run the setup tasks from a script or you could theoretically do the entire setup from single user mode. The setup tasks are necessary to develop a mod.
  3. Not quite, you are comparing 2 constants in that and because the JVM does some stuff with string constants to make them the same object, this expression will be true. However new String("Hello World") == new String("Hello World") will always be false as they are not the same object
  4. This sounds like the perfect use case for a shader
  5. Reflection helper was depreciated in Forge #2780 or something and removed completely in 1.13.2
  6. There’s a dedicated registry event for registering renders. Use it
  7. Post your code as a GitHub repository. We can’t see line numbers on the forums
  8. Post your code as a GitHub repository. Normal block & item rendering is done automatically in 1.13.2. AFAIK creative tabs haven’t changed. Internationalisation (.lang) files are now JSON (.json) files. tterrag has made an online converter. You can view my upcoming tutorials at https://cadiboo.github.io/tutorials/1.13.2/forge/
  9. Have you considered using IntelliJ? Try setting up your workspace from scratch again. If you really can’t see them for some reason, you can always find everything about Forge at https://github.com/MinecraftForge/MinecraftForge
  10. If your using 1.12.2 you can view my example/skeleton mod at https://github.com/Cadiboo/Example-Mod and you can read a tutorial at https://cadiboo.github.io/tutorials/1.12.2/
  11. No, as I understand it you load the textures in the texture stitch event and load and bake the models in the model bake event. This method was developed by elix_x and @Draco18s. I pretty much copied and tweaked it. Draco is more likely to know how it actually works
  12. Take a look at https://github.com/Cadiboo/WIPTech/blob/WIPTechAlpha/src/main/java/cadiboo/wiptech/client/model/ModelsCache.java. Especially the link in the class java doc
  13. Post your logs
  14. What: Not using an interface to register models. (Models are registered automatically in 1.13.2, so some of this may not apply) Why: This interface (commonly called IHasModel) is unnecessary. All items need models and nothing about model registration requires private or protected data. Consequences: This interface makes you write 4 lines of code in each class and 2+ lines of code in your registry event, when 1 or 2 lines of code could accomplish the exact same thing. It also leads to weird bugs when you forget to make your object implement the interface. How: Simply register each model in the registry event (1 line of code for each model) or write a loop that does it for you (1 or 2 lines depending on the implementation). For example: Write out registerModel(item, meta, variant) for each item and variant or write a loop like this for (Item item : allModItemsAndItemBlocks) registerModel(item, meta, variant); A list of all your items can be acquired in many ways, such as looping over registries and checking domain, keeping your own list, looping over registries and using an instanceof check etc. (Models are registered automatically in 1.13.2, so some of this may not apply) What: Not using an object base class. Why: Using an object base class (commonly called BlockBase or ItemBase) is unnecessary and is an anti-pattern. There is already a BlockBase class, it’s the minecraft Block class. Making a class just to have its children inherit default implementations of methods goes against the OOP principle of Composition over Inheritance. Consequences: Using a class like this stops you from extending other classes and because lots of minecraft code uses instanceof checks to specially handle logic, you are likely to encounter weird and hard-to-fix bugs. How: Instead of putting all your common logic in one class and extending it, extract the logic to utility methods. For example: Instead of calling setRegistryName, setTranslationKey, etc. inside your object base’s constructor, extract it to a helper method and call it on every object when you create it. In this example setup calls the above methods registry.register(setup(new CustomItem(), "custom_item")); View more at https://gist.github.com/Cadiboo/fbea89dc95ebbdc58d118f5350b7ba93 (yes I know this text is broken on the dark theme)
  15. Sorry we don't support 1.8.9 or any version under 1.10 on this forum anymore due to their age. We simply don't know how to help you anymore. You can go to the Minecraft Forum where I think that they still still support older versions, or update to a modern version of Minecraft (the latest version or the one before it) to receive support on this forum.
  16. *Cargo cult programming
  17. They don’t exactly “let” you learn. They force you to learn ?
  18. All textures in minecraft need to be pngs.
  19. probably an int, not an Integer This is also the perfect place for a pre-increment with ++counter;
  20. Couldn’t you subscribe to the sound play event and cancel it?
  21. Try stepping through your code with the debugger
  22. What IDE do you use? How did you set up your workspace. The source should be attached automatically and viewable in your external libraries
  23. Why are you trying to do this? You can probably send whatever data you need in the packet
  24. On the client I use final Minecraft mc = Minecraft.getMinecraft(); final RayTraceResult rayTraceResult = mc.objectMouseOver; mc.entityRenderer.getMouseOver(partialTicks);
×
×
  • Create New...

Important Information

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