I need some help with gradlew build

UberAffe

New Member
Jul 29, 2019
143
0
0
I wrote most of the code for a mod and ran gradlew build. It worked exactly as expected and I was able to use the .jar

I altered some functionality of items and added textures, it all works when run from inside eclipse.
I run gradlew build again for the new version and it still creates the .jar but when I try to play it still has the old functionality and no textures. Even doing a new forge instance in a new directory with the only the new .jar, it still uses the original functionality.

How is this possible? Where should I be looking to try and trouble shoot this? (the original .jar was taken out of the /build/libs folder and put in a /releases folder before running gradlew build)

If you need any other information let me know.
Edit: probably important, this is for 1.7.10
 
Last edited:

FyberOptic

New Member
Jul 29, 2019
524
0
0
This is a common and yet frustrating issue for people to debug. Your problem is a disparity in the capitalization between your mod ID and the assets folder, and/or between your item name and the texture filename.
 

UberAffe

New Member
Jul 29, 2019
143
0
0
I ended up re-titeling/re-packageing my whole project. Luckily it is still a small one, but it did fix the problem.
 

UberAffe

New Member
Jul 29, 2019
143
0
0
@FyberOptic
Rereading your suggestion, why would that effect the functionality of the items?
The problem that had been more pressing was that I changed how some of the items interacted with the world, but after gradlew build it still had the old functionality.

(This was fixed by something I did, but I am still curious as to what might have caused it so I can avoid this in the future)
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
When you're debugging, your assets are read directly from the file system, and in Windows capitalization of filenames doesn't matter. Once you build your mod and run it in the game normally, assets are searched from within the jar, where now if capitalization doesn't match then it simply won't find the file.
 
  • Like
Reactions: SatanicSanta

UberAffe

New Member
Jul 29, 2019
143
0
0
That makes sense for not being able to access certain things but what I experience was a little different.

I'll lay it out better:
Original version:
I had an sword class in my items package.
This sword overrode a method(forgot name but it control on-hit effects)
It was supposed to add a knockback effect to the sword but it always pushed things to the north-east.

New Broken version:
class name has not changed and package names have not changed.
I altered the knockback effect code so that it would push away from the player.
This worked in debug.
When I used this version with a separate launcher it still only pushed to the north-east.

Some information on how I was running this:
I was using the curse create custom instance to launch minecraft.
First I tried just swapping the .jar to the new one.
Then I tried deleting the save and making a new world.
Then I tried creating a new custom instance and new world.
all of them had the same problem

If the naming was wrong(such that the sword code was unreachable) then the sword shouldn't have existed and the game probably should have crashed.
So presumably the code could be reached.
The original code was overwritten and doesn't exist anywhere except in versioning on github.
How was it possible that the New Broken version still had the Original versions functionality without the Original code?