-
Posts
3624 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Cadiboo
-
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.
-
[1.13.2] unFormattedComponentText not Equaling a String
Cadiboo replied to cleardragonf's topic in Modder Support
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 -
[1.12.2] Change brightness like night vision does
Cadiboo replied to Meldexun's topic in Modder Support
This sounds like the perfect use case for a shader -
Reflection helper was depreciated in Forge #2780 or something and removed completely in 1.13.2
-
There’s a dedicated registry event for registering renders. Use it
-
[1.13.2] modelLoader help for registering Item Rendering
Cadiboo replied to cleardragonf's topic in Modder Support
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/ -
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
-
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/
-
[1.13.2] Baking a Model WITHOUT an assigned block?
Cadiboo replied to mrburgerUS's topic in Modder Support
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 -
[1.13.2] Baking a Model WITHOUT an assigned block?
Cadiboo replied to mrburgerUS's topic in Modder Support
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 -
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)
-
[1.8.9] Render armour on player without item
Cadiboo replied to Wehavecookies56's topic in Modder Support
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. -
*Cargo cult programming
-
[1.13.2] actual appearence of blockstates jsons?
Cadiboo replied to Drachenbauer's topic in Modder Support
All textures in minecraft need to be pngs. -
-
[Solved] [1.12.2] Reflection fails to find method
Cadiboo replied to DavidM's topic in Modder Support
Try stepping through your code with the debugger -
Where can I find the JavaDocs for the forge API?
Cadiboo replied to N!ghthauq's topic in Modder Support
What IDE do you use? How did you set up your workspace. The source should be attached automatically and viewable in your external libraries -
On the client I use final Minecraft mc = Minecraft.getMinecraft(); final RayTraceResult rayTraceResult = mc.objectMouseOver; mc.entityRenderer.getMouseOver(partialTicks);