Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
mayaknife

[Solved] Setting Up To Build TFC From Source

18 posts in this topic

I want to see if I can track down some of the freezing issues that I'm getting and for that I need to be able to build TFC from source. I've downloaded and installed minecraftforge-src-1.5.1-7.7.2.678.zip and I've downloaded and unzipped TFCraft-Build_76_Hotfix_12.tar.gz from github. Now I need to figure out how to put the two together.

There's a setup.py file at the top of the TFC tree. It starts out by executing the following:

forge_dir = os.path.dirname(os.path.abspath(__file__))mcp_dir = os.path.abspath('..')src_dir = os.path.join(mcp_dir, 'src')

That implies that it's expecting 'setup.py' to reside inside the forge directory and for forge to reside inside the mcp directory. But when I look at my forge installation it's the other way around: mcp resides inside forge. So I'm not sure how to proceed. Any help would be appreciated.

Thanx.

0

Share this post


Link to post
Share on other sites

first off, nice idea, BUT.

1) You are not allowed to post source code from TFC. (In this case it is probably harmless, but still)

2) If you do this, you may not post it here or any other place, without allowance of bioxx.

3) You should probably talk to dunk or bioxx about this, chances are that they might like some help with that.

This is in my opinion the only way to do this, i would even ask them personally before i would look into TFC code.

0

Share this post


Link to post
Share on other sites

The source code is hosted on a publicly readable repository on github, so I don't think Bioxx has a problem with people looking at the code. The prohibition against posting code to the forums is more a matter of not spoiling the mod for others by revealing details that should discover for themselves.

0

Share this post


Link to post
Share on other sites

2nd on reaching out to Bioxx and Dunk, just to confirm it's cool.

You might also reach out to one of the existing Terra-<whatever> mod authors. There's a medicine mod, arrow mod, mob mod, etc. All those guys must have figured out the setup options to create and test their mods (right?)

0

Share this post


Link to post
Share on other sites

If I remember correctly from IRC, you need to follow the tutorial for setting up PlayerAPI and then throw TFC into there, not sure if that's still the same since build 77 no longer relies on playerAPI

0

Share this post


Link to post
Share on other sites

If I remember correctly from IRC, you need to follow the tutorial for setting up PlayerAPI and then throw TFC into there, not sure if that's still the same since build 77 no longer relies on playerAPI

Thanks. I always forget about the IRC channel. I'm still working with build 76 so I'll try giving the playerAPI approach a shot. If that doesn't work then I'll ask on IRC.

1

Share this post


Link to post
Share on other sites

If i understand correctly you want to decompile TFC so you can check/edit source code right ? if so i can help you i did it when i made my mods.

0

Share this post


Link to post
Share on other sites

If i understand correctly you want to decompile TFC so you can check/edit source code right ? if so i can help you i did it when i made my mods.

Yes and no. I want to be able to edit the source code (e.g. to add some debugging lines) and rebuild the mod from source. I don't need to decompile TFC, though, because I already have the source files from github. A couple of people have given me some pointers which I need to try out. If that doesn't work for me then I may message you for more help. Thanks.

0

Share this post


Link to post
Share on other sites

I did try your method and wow it's so easier than decompiling... github FTW ! but like you i could not "setup'' if you find a way tell me.

You still can copy/paste all java docs in src folder of mcp.

0

Share this post


Link to post
Share on other sites

Excuse me all, but stupidity always makes me rage.



But the above post should do it for you.

This is definitely an Optifine related crash, i believe that TFC has its own segment of code on rendering stuff in a certain way (Speculation, i do not have enough skills to look into TFC code. Nor do i feel like it, i think that is disrespectful unless clear permission is given). And that is conflicting with Optifine , so you might say that TFC and Optifine or the Minecraft engine in general are struggling for who gets to tesselate the textures first.


first off, nice idea, BUT.

1) You are not allowed to post source code from TFC. (In this case it is probably harmless, but still)

2) If you do this, you may not post it here or any other place, without allowance of bioxx.

3) You should probably talk to dunk or bioxx about this, chances are that they might like some help with that.
This is in my opinion the only way to do this, i would even ask them personally before i would look into TFC code.

I beg you my dear duke, please be so kind and get your turnip-head out of whatever it stuck in at the other end of your stick body.
While your at it read github terms of service , and let me firmly draw your attention to section F. Copyright and Content Ownership . Clearly you have no idea what OpenSource is.
And please stop trying to stop people helping the author, contributing in his or rather their project. All in all stop generating noise cause that's lowering bandwidth most strongly.



Ok, now that I relived myself.

Let's initialize:

START-PATH=$(pwd)

That way I can be more specific on what and where.

Here is what I've done:
source: http://www.minecraftforum.net/topic/738498-152api-player-api/
( FAQ / #6: How do I decompile this with Minecraft Forge? / Minecraft 1.4.6 or later )

  • [*]downloaded correct version of minecraft forge and player api
    extracted minecraft forge
unzip minecraftforge-universal-1.5.1-7.7.2.679.zip
[*]run install script
cd forgepython install.py
[*]when I saw "Decompiling Client" message I aborted it
^C
[*]deleted mincraft_server.jar and bin/mincraft.jar at $START-PATH/forge/mcp/jars/
and renamed mincraft_server.jar.backup and bin/mincraft.jar.backup
cd mcp/jarsrm mincraft_server.jarmv mincraft_server.jar.backup mincraft_server.jarcd binrm minecraft.jarmv mincraft.jar.backup mincraft.jar
[*]installed player api in mincraft.jar
unzip mincraft.jar -d mincraft_installing_player-apiunzip $START-PATH/MC 1.5.1 - Player API universal 1.5.zip -d mincraft_installing_player-apirm mincraft.jarcd mincraft_installing_player-apizip -r ../mincraft.jar *
[*]then I run decompile script (previously aborted) at $START_PATH/forge/mcp
cd $START-PATH/forge/mcp./decompile.sh
had a coffe-break doing that ... [*]I've read six errors I've got
then opened my favourite text editor (vim, btw)
and edited $START-PATH/forge/mcp/src/minecraft/net/minecraft/entity/EntityLiving.java
/** The new yaw rotation to be applied to the entity. */protected double newRotationPitch;- float field_70706_bo = 0.0F+ public float field_70706_bo = 0.0F/** Amount of damage taken in last hit, in half-hearts */
[*]and $START-PATH/forge/mcp/src/minecraft/net/minecraft/minecraft/entity/player/EntityPlayerMP.java
public float getCurrentPlayerStrVsBlock(Block var1, boolean var2){float var3;if (this.serverPlayerAPI != null && this.serverPlayerAPI.isGetCurrentPlayerStrVsBlockModded){var3 = ServerPlayerAPI.getCurrentPlayerStrVsBlock(this, var1, var2);}else{- var3 = super.a(var1, var2, var3);+ var3 = super.getCurrentPlayerStrVsBlock(var1, var2);}return var3;}=============================public float a(Block var1, boolean var2, int var3){float var4;if (this.serverPlayerAPI != null && this.serverPlayerAPI.isGetCurrentPlayerStrVsBlockForgeModded){var4 = ServerPlayerAPI.getCurrentPlayerStrVsBlockForge(this, var1, var2, var3);}else{- var4 = super.a(var1, var2, var3);+ var4 = super.getCurrentPlayerStrVsBlock(var1, var2);}return var4;}=============================public final float localGetCurrentPlayerStrVsBlockForge(Block var1, boolean var2, int var3){- return super.a(var1, var2, var3);+ return super.getCurrentPlayerStrVsBlock(var1, var2);}
[*]and did the exact same as above
with $START-PATH/forge/mcp/src/minecraft/net/minecraft/minecraft/client/entity/EntityPlayerSP.java, but here I've also edited two more lines
public final int getField_82153_hField(){- return this.timeInPortal;+ return super.timeInPortal;}public final void setField_82153_hField(int var1){- this.timeInPortal = var1;+ super.timeInPortal = var1;
[*]and then updatedmd5 sums
./updatemd5.sh
when it asked me if a mincraft forge maintainer asked me to do this I lied yes
what else should have I done? It would'nt recompile otherwise [*]now I could add TFCraft to $START-PATH/forge/mcp/
[*]and i could rollback to the bugfix or where ever
git checkout <commit shasum>
[*]to find out <commit shasum>
git log --oneline
and
git log
[*]also had to
cd $START_PATH/forge/mcp/TFCraftln -s TFC_Shared tfc_shared
you know just becouse Linux needs that kind of accuracy but can be forgive-full the same time.

At current state 77 already uses 1.5.2 - Forge v7.8.0.725.

And looking awesome.


Pottery rocks!

Post your TFcraft Pictures



I can't attach the screenshot right now, but according to spAnser the site will move finally later this week.
Hopefully then I'll can.


P.S. Duke this above is not TFC's source code that I've posted, :ph34r: trust me.

0

Share this post


Link to post
Share on other sites

oh well, first of all, thanks for being rude :sob... no it's okay :D

I think i just have not been getting to respond to any posts contradicting my, as i see now obsolete opinions.

On the point of open source and github terms, i know that...or should know that ^^ but it was mine and only my personal opinion, sorry for not pointing that out :unsure: i just feel that when messing around with others work, a polite thing as asking is as much as a "hey man i really like what you did there, mind if i mess around with it?".

Also i can see its not anything TFC related but the path for its commit (as i see it) and messing with forge.

but mind i ask, why did you do that to the entityliving.java ??

is it because of the way TFC handles the health and damage system differently ??

Also I'm not that much proficient in coding, I'm still at the "learning mathematical logic" part of my education.

(In denmark, you don't even get to code anything other than some html before you have had 3 years of math on the highest available level of "A")

Also I'm somewhat happy that i understood at least between a half and two thirds of this :D

0

Share this post


Link to post
Share on other sites

oh well, first of all, thanks for being rude :sob... no it's okay :D

Sry, I got carried away. Despite It took me half of a day to get to the point where I can post. (Spam filters, pfff)

I think i just have not been getting to respond to any posts contradicting my, as i see now obsolete opinions.

I'm not sure if I got this. Oh well anyway, I don't think this is just your opinion, as I see this is a result of a brain wash, no offends. Nevertheless you can't fight much if an international company spends millions on washing people's brain. And that's also the reason I reacted harsh.

Btw, I hope the belief of free information (or software) does not get obsoleted any time soon. For one thing Linux is on the rise, on the other hand getting more commercialised. But enough of this.

On the point of open source and github terms, i know that...or should know that ^^ but it was mine and only my personal opinion, sorry for not pointing that out :unsure: i just feel that when messing around with others work, a polite thing as asking is as much as a "hey man i really like what you did there, mind if i mess around with it?".

If you're not just into computers and stuff, but also want to learn how to code, you should look into these kind of things.

Sooner the better or there's a chance you'll become a manager which ain't bad financially. But still please don't do that, at least where I come from there's almost more managers than a engineer can handle.

There's more to it than you'd think first. Some would say philosophy, but I think this word is dangerous and it's only good to cause lot's of lot's of suffering.

Also i can see its not anything TFC related but the path for its commit (as i see it) and messing with forge.

but mind i ask, why did you do that to the entityliving.java ??

is it because of the way TFC handles the health and damage system differently ??

First of all I have no clue what this property or attribute (or whatever java people call data) is for. And ensuring you about my intentions was just an excuse to use a smiley in my post.

But seriously this is a Player API related thing. Player API has EntityPlayerSP and EntityPlayerMP classes extending EntityPlayer class, which is a descendent of the EntityLiving class. Now EntityPlayer and EntityLiving are minecraft classes and they're in the same package I think. And if I recall correctly java has a by default package level visibility of attributes and methods (or functions). Anyway because player API is out of that package the visibility of this attribute must be increased in the ascendant that implements it, in this case this is EntityLiving although it is not the direct parent class.

I've already went off topic, so I'm not gonna sink further in the depth of object oriented principals and terminology. I hope I still could gave kind of an answer there. Of course the short answer else it does not work or because Divisor sad so.

Also I'm not that much proficient in coding, I'm still at the "learning mathematical logic" part of my education.

(In denmark, you don't even get to code anything other than some html before you have had 3 years of math on the highest available level of "A")

Also I'm somewhat happy that i understood at least between a half and two thirds of this :D

Same here, as far of the structure of the eduction, but I sit in-front of the screen an start coding asap I get out of lettuces. Obviously I know the basics of java. And as a Linux user I write shell scripts for anything or everything like watching tv series online. Last I learned python. Next C++ as paying a long-term debt then perl, which I had a glimpse way back in high-school.

But let me try to convince you a firm (not so) fundamental knowledge in mathematics is very handy in the IT or rather program engineering game.

0

Share this post


Link to post
Share on other sites

I've been having a lot of trouble this year making time for all my interests and hobbies, for one there are the major three.

music, school, and the girl, i get money by playing jazz and folk, and school takes a lot of time, as so does she. In Denmark the teachers believe that the more foundation, the better (ughh) and i am in a kind of high school thing called "Higher Technical exam" or HTX.

I don't know if they want us to be mad scientists, engineers, physicists, mathematicians, web and media designers or all of it at once...

but i guess they really make money out of ideas, for such a small country... :)

ohh well listen to old me ramble... here's your present! A nice sweet roll i baked just this morning for you!

EDIT: Wait....brainwash? i don't think so ^^ hehehe, can you find the torrent, "A Car"?

and if so... tell me what size it is

0

Share this post


Link to post
Share on other sites

... build 77 no longer relies on playerAPI

 

I've compiled the latest commit.

To do so:

[*]Unzip minecraftforge-src-1.5.2-7.8.0.725.zip,

[*]run the install script,

[*]copy or clone from github TFC source to mcp directory.

[*]Create 'TFC Build' directory in mcp,

[*]if you're running linux link 'TFC_Shared' and 'TFC API' to 'tfc_shared' and 'tfc api'.

[*]Finally run release.py.

0

Share this post


Link to post
Share on other sites

Almost forgot, yet it took me a couple rounds to figure it out.

 

delete .mincraft/config/TFC.cfg

 

or else it crashes with an IllegalArgumentException.

0

Share this post


Link to post
Share on other sites

I still do not understand. I also want to create an Add-on-Mod for TFC. So I need the minecraft source code and the TFC source code, right?

I know i can download the minecraft cource code here: ww.modcoderpack.com/website/

But where can I download the TFC source code so I can edit it with eclipse?

At your github site i can only see the single classes...

 

Thanks

0

Share this post


Link to post
Share on other sites

In http://terrafirmacraft.com/f/topic/6576-help-with-modding/?view=getnewpost there is a guide posted that may help. I can't speak to its accuracy or quality as I have never used.

Might be worth watching https://m.youtube.com/playlist?list=PLQPiZYWovwmnlE5eM3enBKhTNCg8-JDU1 and minemaarten did a follow up.

To get the TFC code just copy it to your desktop the same way Pahimar shows for the empty repo.

Edited by Bunsan
0

Share this post


Link to post
Share on other sites

Ok thank you so much!

The first link is a very good explanation with pictures!

I hope it works now!

0

Share this post


Link to post
Share on other sites