Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.5.1/1.5.2] [SMP] Haribote Aircraft Mod multiplayer fork


  • Please log in to reply
43 replies to this topic

#1

Ran_Cossack
  • Minecraft: rancossack

Posted 14 June 2013 - 09:37 AM

Hello;

This is my first post here -- and first time mucking with minecraft's internals -- so please excuse any mistakes I make.

As my story goes, following a nice hiatus from Minecraft, I returned, loved the changes, tried out the new tekkit, and had a blast.

I shortly went looking for a successor to Movecraft, a very fun mod I used to enjoy playing with my family and some friends. It turned out I'd missed something of a golden age in build-your-own vehicles while I was away.

There was a very fun looking mod called "Haribote Aircraft Mod" made by Waco, available here:
http://forum.minecra...hp?f=13&t=10418

... so naturally, I tried it. Alas, it had some issues working on multiplayer... at which point I noticed the mod's creator, Waco, had extremely kindly *also* released his mod as open source under an apache license.

I'm not a java developer -- well, not for quite a long time --  but I am a developer, so I figured what the heck, why not.

This is just a very simple fork of Waco's mod so it works in multiplayer. It isn't perfect. The original mod had these "issues":
  • Fails to load on a SMP dedicated forge server. (Can load when a client "shares" a world)

  • All Aircraft control is shared by everyone; any aircraft key controls all aircraft.

  • Aircraft takeoff/landing is announced to everyone on the server.
This fork fixes all of the above, and adds in near-replacements for some movecraft features I liked; they are disabled by default, but if you edit your config/mod_HariboteAirCraft.cfg file, you can change blockFlyPercent to the percentage desired (60 for movecraft-esque ships) to set a requirement for flight. For example:

blockFlyPercent: 60

... means you'll need 60% of your craft to be wool to fly. If you want to fake ships, you can use the blockFloatPercent option to make your ships float in water. (Set it to 0 will make everything float.)

Setting either of these options to -1 will disable the feature, which is the default. :)



You can get the vanilla/single player Haribote Aircraft mod from the forum here; you'll need to get the YMLib for the right version as well:
http://forum.minecra...hp?f=13&t=10418

Minecraft 1.5.2 needs:
YMTLib_152v1
    HariboteAirCraft_152v1_mp2 (fork; this version is for both client and server)

My siblings and I actually use Tekkit, which is still on 1.5.1. :
Minecraft 1.5.1 needs:
YMTLib_151v3
HariboteAirCraft_151v3_mp2 (fork, this version is for both client and server)

Minecraft 1.4.7 needs:
YMTLib_147v2
    HariboteAirCraft_147v6_mp2(fork, this version is for both client and server)
  

The mod itself uses Ritsugami's Modloader, but I test it and run it with Forge. (I'm not about to seriously port it; the code for the mod itself looks complex and pretty lovely, while my changes lean more toward 'D: hack'.)

To install, have forge, download YMTLib and a HariboteAirCraft mod, and drop them in your mods folder. There you go. The server and client should both be running the mp version if you intend to use the blockFlyPercent and blockFloatPercent features, but other wise the clients can be using the original mod.

Waco mentioned possibly merging in the MP code, so this fork might not last long. ;) (Which would be awesome; updating code is hard.) Or I might maintain just the movecraft parts for my friends and family's server.

(This version also fixes the "dead server config file" bug.)

Register or log in to remove.

#2

xSatuim
    xSatuim

    Glowstone Miner

  • Members
  • 3101 posts
  • Location: Queensland, Australia
  • Minecraft: Satuim

Posted 14 June 2013 - 10:58 AM

A vechical mod updated!
Those are rare
This account is unused!
NEW ACCOUNT

#3

VariousArtist

Posted 14 June 2013 - 01:12 PM

Yes, indeed. Very rare... And this was hidden behind a language barrier..nice find!

MadRealms: The Skyland Pirates [Factions-PvP][Airships][Skylands][Survival] IP: madrealms.net
www.madrealms.net - We create Worlds!


#4

sevenswords1

Posted 14 June 2013 - 06:07 PM

wish that you can put the same controlls as vanilla mc on the controlls
Posted Image

#5

fuggazzi
    fuggazzi

    Tree Puncher

  • Members
  • 21 posts

Posted 15 June 2013 - 04:45 PM

Marvellous! I was already familiar with this great mod, but was missing SMP. Would you please consider adding a server package to the 1.4.7 version? There is quite a bit of people still playing 1.4.7 due to redpower, and waco frequently updates the 1.4.7 version of haribote. Thanks in advance

#6

Arisina
    Arisina

    Newly Spawned

  • Members
  • 1 posts

Posted 16 June 2013 - 11:40 AM

A great work indeed.  As fuggazzi said this excellent mod only lacked SMP support, and I am quite delighted to see it work in SMP.  However, I think I stumbled upon a bug:  the MP version does not seem to read and apply the configuration file, so I can only move the default (=vanilla) blocks (I had included block IDs of other mods that I play with, and the .conf file works mostly fine in the SSP.)  It does make a .bak file though...

Or maybe I did something wrong (or looking at the wrong places)?  Any help would be greatly appreciatedPosted Image

#7

ldrn
    ldrn

    Newly Spawned

  • Members
  • 1 posts

Posted 17 June 2013 - 07:53 AM

*edit* Oops. Did I have an old account I forgot about here?

#8

Ran_Cossack
  • Minecraft: rancossack

Posted 17 June 2013 - 07:57 AM

Thanks!

@sevenswords1:
I think the reasons for the different controls is so you can move around while your ship moves. However, that is fairly buggy... but you can get off the ship. :)

@fuggazzi:
Hmm, a 1.4.7 version... I'll have to see how hard it is. If I can! Waco asked about merging this in to his mod -- so as soon as I fix the config issue that might happen!  (I want to get it fixed first.) I fixed the other problems with a build I have, but that is the biggest one. I did have more issues with 1.5.2 and 1.5.1 than I thought, which is not a good sign...

@Arisina:
No, it is not you. I see what it is doing, but am not sure how to fix it; in multiplayer only mode it reads then renames the config file.

I've added quite a few features for my own reasons -- an optional requirement of wool (or any block) for flying as a percentage of total mass, and "float"ing in water (and sinking just a bit if they can float but can't fly) for ships -- but I need to get the config file working so that can be disabled before I'll upload it.  And then who knows, maybe the MP stuff will get merged in, and just the extra stuff will be here.

#9

fuggazzi
    fuggazzi

    Tree Puncher

  • Members
  • 21 posts

Posted 17 June 2013 - 08:26 AM

Ran,
Actually I already took a look and compared the code from 1.4.7 and 1.5.2 versions, and it seems that the differences are minimal.  
It wouldn't surprise me if you could edit the 1.4.7. source with the same code you inserted in your 1.5.2  version .

Could you tell me please how you recompiled the modified source? Is it MCP with forge or modloader? Did you put Ymtlib.zip in minecraft. jar?

#10

Ran_Cossack
  • Minecraft: rancossack

Posted 17 June 2013 - 08:37 AM

Oh, sweet -- that's great news! I'll check it out later -- or if you wanted to, my setup is:

I use MCP with modloader in the jar when it decompiles, then unzip Ymtlib and Haribote into the source directory. After that, I run a shell script that pipes all the java and txt files through ujconv (you might be able to avoid this part) so Java won't complain about encodings and so my editor will instantly know it is Japanese, then another script removes all the class files.

I edit the code with jedit or vim, then run recompile.sh to see if there are any errors.

When it is time to package it up, I have another script I run after reobsfucating that just picks out the Haribote Aircraft files and packs them up into a zip. A forge folder has a symlink right to the zip file, so I fire it up and test.  Posted Image

I have a git repo for the changes I've been making if you'd like to take a look -- but it something of a mess right now; I am doing all my current work on the 1.5.1 branch, and the problems I alluded to earlier were at least half because I had my editor set to "fix" whitespace, thereby making the diffs git makes a lot less useful.

... not the most efficient way to do things, probably.

*edit* I found out how to fix the cfg file thanks to this guy (such a simple fix):
http://www.minecraft.../#entry12674905
I'll to make a clean version and post it later.

#11

fuggazzi
    fuggazzi

    Tree Puncher

  • Members
  • 21 posts

Posted 17 June 2013 - 04:10 PM

View PostRan_Cossack, on 17 June 2013 - 08:37 AM, said:

Oh, sweet -- that's great news! I'll check it out later -- or if you wanted to, my setup is:

I use MCP with modloader in the jar when it decompiles, then unzip Ymtlib and Haribote into the source directory. After that, I run a shell script that pipes all the java and txt files through ujconv (you might be able to avoid this part) so Java won't complain about encodings and so my editor will instantly know it is Japanese, then another script removes all the class files.

I edit the code with jedit or vim, then run recompile.sh to see if there are any errors.

When it is time to package it up, I have another script I run after reobsfucating that just picks out the Haribote Aircraft files and packs them up into a zip. A forge folder has a symlink right to the zip file, so I fire it up and test.  Posted Image

I have a git repo for the changes I've been making if you'd like to take a look -- but it something of a mess right now; I am doing all my current work on the 1.5.1 branch, and the problems I alluded to earlier were at least half because I had my editor set to "fix" whitespace, thereby making the diffs git makes a lot less useful.

... not the most efficient way to do things, probably.

*edit* I found out how to fix the cfg file thanks to this guy (such a simple fix):
http://www.minecraft.../#entry12674905
I'll to make a clean version and post it later.

Well, unfortunately I'm not a coder. I just reasoned by analogy and learned myself how to de- and recompile using MCP.
Today, I looked further into it. I succeeded in getting the Japanese comments out of the way and in recompiling the 1.4.7 version with your differences.

Good news is that your code is entirely accepted by Forge 1.4.7 (also for server).
But there is one Modloader method in the original code("ModLoader.addOverride") that is not accepted by Forge 1.4.7 servers (in contrast to the client, which accepts it). Further good news, is that there is only a small place in the entire code that leans upon that method. Namely lines 339-346 in the original 1.4.7 AirCraftCore.java.

Fyi, the Modloader.addOverride method (which is deprecated in 1.5), is used to point to a custom texture image.
I do not know enough about Modloader to deliver an alternative way of using custom textures for 1.4.7, but I believe there is allways the original Mojang way: pointing to a free spot in the terrain.png.

Please, feel free to set your own priorities. In any case, I would be most grateful if you could suggest a way to overcome the Modloader.addOverride.

Btw. If you feel confident that your github is neat enough, I would be glad to take a look (not as a coder, but as someone willing to learn how to code and help)

#12

Ran_Cossack
  • Minecraft: rancossack

Posted 20 June 2013 - 11:05 AM

Aaah, sorry. Work has been killing me this week and looks set to do the more of the same for the ending sprint. x_x

Plus the cfg fix was worse than I thought; Java wasn't nearly as lenient about not caring if it knew the types of those empty arrays as I thought it was, it was just failing silently. Posted Image Finally did a fix for 1.5.1 tonight and it seems good, will test more and port elsewhere if it really is.

*edit*
Whew. That was harder than I thought, but I cleaned it up, got it on github, then used the clean version to cherry pick into clean 147 and 152 branches -- only had to clean up a few merge conflicts. 147 has its own workaround for that texture issue; the server thinks the pyxis has a stone texture or something. :)

#13

babbajagga

Posted 24 June 2013 - 06:10 PM

I just yesterday before I went to bed encountered this fantastic "zeppelin" mod.
tested the mod on sp, and it worked w/o problems... didn´t thought it will be smp incompactible - which I just found out :(

And now I encountered this "fork" as you call it! YAY! it works on SMP now for me... mmmm!!! ♥

Now the only thing I have to solve/find solution for is to how to make the mod accept blocks from other mods, because as someone already reported previously ... it does not connects to other than default MC blocks :(

and with XtraBlocksEE mod I find it really depresive to not be able to build finaly my ultimate airship :D
so let´s hope there will be soon some fix for that sad fact :)


Posted Image Posted Image Posted Image Posted Image Posted Image Posted Image Posted Image
Posted Image

#14

Pynthax
    Pynthax

    Out of the Water

  • Members
  • 5 posts

Posted 24 June 2013 - 06:15 PM

Just wanted to say that its truly awesome work you are doing!
And if you are able to get that cfg file to work this mod/fork might just work on a open server with loads of players :)

#15

Ran_Cossack
  • Minecraft: rancossack

Posted 25 June 2013 - 03:25 AM

View Postbabbajagga, on 24 June 2013 - 06:10 PM, said:

Now the only thing I have to solve/find solution for is to how to make the mod accept blocks from other mods, because as someone already reported previously ... it does not connects to other than default MC blocks Posted Image
You can, actually -- though it can be a bit complicated. :) After running it once, you should have a mod_HariboteAircraft.cfg file in your minecraft/config folder on the client and server. The key entry for you is:
    blockAppend

If you know the ID numbers of the blocks from other mods that you want you can add them to that. Mine looks like this:

blockAppend=919, 918, 917, 930, 590, 582, 583, 584, 585, 586, 601

... I haven't tested all of those out yet, but it works with the tin decorative block from Tekkit with GalacticCraft. :)


View PostPynthax, on 24 June 2013 - 06:15 PM, said:

Just wanted to say that its truly awesome work you are doing!
And if you are able to get that cfg file to work this mod/fork might just work on a open server with loads of players Posted Image
Thanks! :) Gotta give all the credit to Waco, though -- making it multiplayer compatible was tricky, but half of that's probably me just bumbling around.  Actually, the latest version works with the cfg file for me; let me know if it is still giving you problems.

#16

babbajagga

Posted 25 June 2013 - 06:05 PM

*speechless* !!!
gonna test it right now, if this works... mmmmm! that would be awesome Posted Image

brb

***edit***
hmm... I could have spare me the time/effort... after 2,5hours of writing in the IDs into the cfg, I logged into the game... and those are the results:

1. IT WORKED!
well... at least... the non-default blocks connected to the Pyxis block
but...

2. all textures get messed up totaly if the Pyxis block is activated :/

before the activation of Pyxis block
Spoiler:

after the activation of Pyxis block
Spoiler:

any idea? Posted Image
but I guess it is due to the fact the mod does not works with external texture sheets from mods, just with the default one,... well... I will never have my ultimate aircraft build Posted Image

Edited by babbajagga, 25 June 2013 - 09:00 PM.

Posted Image

#17

Mr_boness
    Mr_boness

    Lapis Lazuli Collector

  • Members
  • 992 posts
  • Location: Wherever you want me to be.
  • Minecraft: mr_boness

Posted 25 June 2013 - 11:07 PM

I tested this in multiplayer, and it was horrifying xD
The arrows on top of the pyxis replaced each block, and we couldn't deactivate it. We also couldn't jump onto it, or it will create a block glitch and we would be unable to move.
You should really check out the Runestones mod, it's amazing, and has my full support and attention. Who wouldn't want to shoot fireballs?

#18

Ran_Cossack
  • Minecraft: rancossack

Posted 25 June 2013 - 11:24 PM

View PostMr_boness, on 25 June 2013 - 11:07 PM, said:

I tested this in multiplayer, and it was horrifying xD
The arrows on top of the pyxis replaced each block, and we couldn't deactivate it. We also couldn't jump onto it, or it will create a block glitch and we would be unable to move.

O_o

Wow. That doesn't happen when I use it. My regular server is 1.5.1 with the normal Tekkit pack mods, and that's where it gets the most testing.

I didn't see it happen in 1.5.2 or 1.4.7 either, but I only tested those briefly (To make sure the mod worked, the config file acknowledged changes, and that two people could fly around without controlling each other's ships.).


I can't imagine what would cause that kind of nightmare error. Sorry. If it helps there should be a "terminate" key now.

View Postbabbajagga, on 25 June 2013 - 06:05 PM, said:

any idea? Posted Image
but I guess it is due to the fact the mod does not works with external texture sheets from mods, just with the default one,... well... I will never have my ultimate aircraft build Posted Image
Awww, dang. :( Yeah, I guess you are right. I must have lucked out because the block I used reused and retinted and existing texture.

I will have to poke at this a bit; I am not sure if I will be able to fix it though.

#19

Pynthax
    Pynthax

    Out of the Water

  • Members
  • 5 posts

Posted 26 June 2013 - 02:06 PM

Ooh! I missed you had posted a updated version, so appending and ignoring blocks now works awesomely well for me, ty!

Do you think it would be possible to make it so that if there isnt enough wool the ship would not be able to move at all?

#20

babbajagga

Posted 27 June 2013 - 06:14 PM

View PostPynthax, on 26 June 2013 - 02:06 PM, said:

Ooh! I missed you had posted a updated version, so appending and ignoring blocks now works awesomely well for me, ty!

Do you think it would be possible to make it so that if there isnt enough wool the ship would not be able to move at all?
it is already implemented AFAIK...
see the .cfg file...  and read the text in it... it clearly states how much percentage of specific blocks (if set) must be present to be able to fly Posted Image

(it is called "blockFlyPercent" same works for floating on/in water "blockFloatPercent")

thus if you set it to ie. 10 = 10% of ie. Wool from ie. 2000 blocks must be present to be able to lift off or float, otherwise the "craft" will sink and/or not fly.

Edited by babbajagga, 27 June 2013 - 06:16 PM.

Posted Image