Jump to content

How can I build a new "clean" jar having my changes as well?


MrChoke

Recommended Posts

I have made many changes to the "clean" project available from Forge.  I can't use a forge build because many of my changes have no available hooks or ability to do it with Forge.

 

How do I build a jar with my changes?  I have tried "gradlew clean:jar" and it said it was successful.  But I don't see that it did anything.

Link to comment
Share on other sites

35 minutes ago, MrChoke said:

I have made many changes to the "clean" project available from Forge.

And you did everything wrong. Congradulations.

 

The whole point of the "clean" project is that it's fucking clean. Exactly what vanilla shipped so that patch files can be generated correctly. You are not meant to touch the clean project in any way and Forge does not support or condone building it.

  • Sad 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Yeah, thanks the rude response.  Typical of most of you people on this forum.  I am modding for me, not you or anybody else.  You tell me how I can use forge to make all the mos climb ladders, open trap doors, open/break fences and a bunch of other cool stuff then maybe I'll "do it right".  Until then, too bad.

 

I figure it out anyway at least for the sever.  I didn't do the client yet.    Thanks again for nothing.

 

BTW, why is there a clean jar and clean release task in the project?  I wouldn't have even asked if I didn't see those.  Why have them if clowns like me try to use them right?

 

 

Edited by MrChoke
Link to comment
Share on other sites

1 hour ago, MrChoke said:

BTW, why is there a clean jar and clean release task in the project?  I wouldn't have even asked if I didn't see those.  Why have them if clowns like me try to use them right?

I already answered that:

1 hour ago, Draco18s said:

so that patch files can be generated correctly

This is specific to contributing to Forge not making mods.

 

And if you want to make a mod for yourself without using Forge, then you can get help elsewhere. We only help people who use Forge and you are not using Forge (instead you are explicitly going around Forge). Therefore I don't particularly care if I am rude (see my signature).

 

1 hour ago, MrChoke said:

You tell me how I can use forge to make all the mos climb ladders, open trap doors, open/break fences and a bunch of other cool stuff then maybe I'll "do it right".

All of that would be covered by entity tasks.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

7 hours ago, MrChoke said:

BTW, why is there a clean jar and clean release task in the project?  I wouldn't have even asked if I didn't see those.  Why have them if clowns like me try to use them right?

They are used to develop and distribute Forge. As a user of Forge you should not use such tasks.

 

7 hours ago, MrChoke said:

You tell me how I can use forge to make all the mos climb ladders, open trap doors, open/break fences and a bunch of other cool stuff then maybe I'll "do it right".  Until then, too bad.

Check out how such behaviors are implemented in the player, then apply them to your entity via tasks.

 

Users of Forge should not modify the Forge codebase at all, as doing so is fundamentally breaking Forge’s design, and will not work on any Forge versions. Even if Forge does not have hooks to features you wanted (which is not your case), it would be way better to submit a PR or use ASM.

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

Like I say, I have no intention of distributing these mods in any way, my work is only for me.  I wanted a jar to run on my laptop as well as my desktop PC, that was the need.  

 

As far as using Forge I am not sure what an entity task is exactly.  Is that a forge construct??  I know what tasks and goals are for the AI in vanilla.  My mod for example allows ALL mobs to go up ladders.  I had to make core changes to LivingEntity travel() among other core areas.  Sure I can create my own versions of all of the mobs in the game, copy tons of code into my own versions of it,  then turn off all of the vanilla mobs (I assume I can do that with forge).  Fine, yeah.  If I want to publish my mod someday maybe I'll do that

 

Anyway, sorry I asked.  I have been burned so many times asking questions here and and on Discord you'd think I would have learned my lesson by now.

 

Link to comment
Share on other sites

15 minutes ago, MrChoke said:

As far as using Forge I am not sure what an entity task is exactly.  Is that a forge construct??

No. Its a vanilla thing. The net.minecraft.entity.ai package contains various AI tasks, such as ZombieAttackGoalMoveThroughVillageGoal, and NearestAttackableTargetGoal. If you were to look at any given entity and the method applyEntityAI(), you'd find these.

 

Previously these were stored in an array list type structure called tasks (its now called goals or goalSelector).

21 minutes ago, MrChoke said:

(I assume I can do that with forge)

You can. But there's no need if all you're doing is changing the entity goals. You can just alter their goals (goalSelector is public and has both add and remove methods), rather than replicating their entire class's code just to give it different goals.

25 minutes ago, MrChoke said:

I had to make core changes to LivingEntity travel()

I don't see why, the code already checks for ladders and does appropriate things. The only thing you should have to do is give mobs a different pathfinder so that the pathfinder knows about ladders.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Ok, you do mean the ai tasks and goals.  I have used those a ton including making my own.  "Brain" and the sensors I am learning now but that is all new to 1.14 and I had not done this stuff since since 1.13.  For example I have them opening trapdoors and fences.  Those are new goals I created for the AI.  Note you still need to update pathfnding for this too.  TRapdoors and fences each have their own PathNodeTypes but the pthfinding is hard-coded to treat them a certain way.  An AI task or goal can't change this.  ALl it can do is call tryTOMoveXYZ() to the pathfinder code.

 

As far as going up ladders I assure you it is not that simple either.  The vanilla pathfinder does not path search up or down ladders.  The heart of it is WalkNodeProcessor and findPathOptions.  It doesn't check up or down when calling getSafePoint().  And once you get the pathfinding to work you still have to get the mob to actually move up or down.  That is harder part.  I had to change MoveController and travel.  The vanilla code in travel has hard coded 0.2 upward movement on a ladder (that is why you see him use a ladder on accident sometimes) and nothing for down except it stops free fall if you are on the ladder.  Non-flying mobs use MoveController to set the "moveForward" and rotationYaw" which travel uses.  "moveVertical" exists too however a walking mob never uses it, only flying ones do (it uses FlyingMoveController).  travel never gets anything but 0 for moveVertical unless all of the code for a flying mob gets executed.

 

I have learned this code very very well back in 1.1.3  I had fixed numerous bugs too.  One in 1.15 that people reported is mobs spinning on scaffolidng and not path finding over it.  Not my mod, not anymore.  I fixed it.  That fix was easy compared to most of the other stuff I have achieved.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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