Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/06/20 in all areas

  1. Hey guys, after some weeks of getting experienced with Minecraft modding, I want to submit an issue here that occurs when you use the IDE IntelliJ for your mods. I started with a very basic mod to implement my own items. Therefor, I had to learn about modding and first of all, gradle. Since I am no Java newbie, I know how projects were structured and how to handle with IDEs. I've always used IntelliJ. Eclipse is good and has a ton of features but I am still preferring IntelliJ. So here is the problem. There are several articles and forum topics mentioning the setup of workspaces for your mods in IntelliJ. This is also one of the topics in the official Minecraft Forge documentation. The steps to setup such a workspace aren't hard and were done very fast. But when I tried to test my mod, I ran into the first issues. The textures simply didn't load and I couldn't explain why this happens. I checked every file I wrote at least 10 times, I checked the textures, I copied whole repositories from people that offered Minecraft modding tutorials, I even forked famous mods just to see how they handle their item implementation and why my textures weren't working. Nothing worked. I always got the famous purple-black texture ingame and several errors about missing textures and models. Since I realized that not even my localization file was being loaded, my assumption was that the assets folder wasn't loaded at all and when I tested it with some log messages, my assumption was quickly confirmed. Nothing what I did seemed to fix this issue and I was about to give up but after some hours of searching through all the internet pages I've found about that issue or even about little keywords, I finally found a little post about IntelliJ messing around with the assets folder. There is a simple solution. You can put the following code at the end of your build.gradle and everything will work perfectly fine: sourceSets { main { output.resourcesDir = output.classesDir } } No errors, no warnings, all textures instantly loaded, all models loaded, everything was localized. So... why do I post this? There is still something wrong. Why does not a single post mention this code? Why is it marked as deprecated? Why do no popular mods use this code in their build.gradle? Well, most mod creators use Eclipse, that's for sure and Eclipse doesn't have this issue. Lucky for them but what about modders that actually use IntelliJ and don't have this issue? I quickly realized that this code might help with the local testing environment but you can't build your mod with it. It will give you an error. You can only build your mod when you remove it again but the local client instance doesn't work then. Interestingly when I build the mod, the assets are copied just fine and everything works in the real game when you load the mod. However, you can't get working textures in the IDE when you don't put this code in your build.gradle. So what is the solution of this? How do you get IntelliJ to run without problems if you want to test AND build within the same project. The only thing that comes to my mind would be a work around to load an artifact whenever you start your client which copies the assets manually but that sounds too difficult for making a Minecraft mod. I am open for suggestions, thanks for reading. Greetz, Relentless Solution for this problem:
    1 point
  2. Take a look at this topic here: https://forums.minecraftforge.net/topic/91282-1161-setrequirestool/?tab=comments#comment-423212
    1 point
  3. No, you can do an animation without the need for UseAction. You will just need to edit how the player renders in first and third person. A combination of RenderHandEvent and RenderPlayerEvent should do fine. You could also do RenderLivingEvent to handle all BipedModels as it's fields are publicly accessible anyways.
    1 point
  4. Hi You could try this tutorial project; it has a lot of working examples. I'm just updating it from 1.15.2 to 1.16.3 at the moment, about 90% updated. https://github.com/TheGreyGhost/MinecraftByExample http://greyminecraftcoder.blogspot.com/2020/05/minecraft-by-example.html Cheers TGG
    1 point
  5. Debatable. There is a reason we recommend removing Optifine as an initial troubleshooting step.
    1 point
  6. This function is not renamed in the default 0514 mappings, but exists in 0723 and onwards. You need to update your mappings. To do so: Join the Forge Discord server: https://discord.gg/UvedJ9m Right click the forge-bot#9014 user, and click Message Send the command !mcpv to it It will respond something like this: To update your mappings, enter the build.gradle file of your mod, find the line starting "mappings channel" and replace it with the one the bot gives you. You will need to start a reimport of the Gradle project, Eclipse and IDEA will tell you how to do this upon saving the file. Once the import finishes, the name will be available.
    1 point
×
×
  • Create New...

Important Information

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