catageek / ByteCart

Minecraft plugin for bukkit to create a LAN/WAN rail network with routing algorithm
GNU General Public License v3.0
27 stars 9 forks source link

Bukkit/Spigot 1.8 Combatibility? #34

Closed thiefa closed 9 years ago

thiefa commented 9 years ago

Hi Catageek, Any chance you update Bytecart to be 1.8 Bukkit / Spigot combatible?

If tested it on 1.8, as i want to switch from 1.7.9 to 1.8+, but it dosent work. i can get a ticket from the signs, but routers wont switch :(

would be nice if you could make it work with 1.8+.

dwi commented 9 years ago

Looks like it can't read from books

https://www.irccloud.com/pastebin/px2zvYuw

catageek commented 9 years ago

I need to take some time to check that. I never tried the spigot version of craftbukkit.

thiefa commented 9 years ago

take your time. thank you for keeping the plugin up and running :)

catageek commented 9 years ago

I have good news and bad news.

The good news is that I found the first issues with 1.8 and they can be solved.

The bad news is that MC1.8 broke the books and they must be regenerated. The books in the chest above routers must be manually deleted. Thanks to the bcupdater command, they will be automatically created with an updater cart.

The other bad news is that this bug affects all ByteCart signs and broke my test world. Be sure to use the fix of spigot when converting a 1.7 world to 1.8 if you don't want to break things.

thiefa commented 9 years ago

well, i can live with the book deleting thing. anyway have expanded my network and need to run a full update. (again :) ) pretty sure my 1.0.0 net has over 30 routers and a million blocks in tracks :)

now i just need a good solution for updating networks across worlds, but i guess i will use fake routers, with the others world network ip, and after the backbone has been updated with the fake router ip, i will set back the teleport-signs :)

catageek commented 9 years ago

I am now stopped at the redstone not updated when a lever is switched. The lever is actually updated, but the redstone is not. I am not sure to find a workaround for this one as I used an obscure trick that bergerkiller was using in TrainCarts and it does not work anymore. Unfortunately bergerkiller did not update his plugins and there is no documentation on how to replace this trick.

If you know some plugins that switch levers and that were updated recently let me know to check their code.

thiefa commented 9 years ago

ok, will keep my eyes open

frycjiri commented 9 years ago

Could you please point us to the section of code where you switch lever? I am not sure, so this is just a idea. With 1.8 and new metadata system is possible that switching lever by old system (Lever a; a.setData(a.getData() ^ 0x8); //switching lever with XOR) dont work correctly. Did you try to switch it by new metadata system (Block state)? http://minecraft.gamepedia.com/Lever

catageek commented 9 years ago

The code that switch the lever is here. The last line tries to force the physics update of the block where the lever is attached. The issue is there: the physics is not updated.

It calls a code where the trick is here. It used to work with bukkit <= 1.7.

catageek commented 9 years ago

please try this FIXED. It should work. It worked in my test server.

Don't forget to delete all the books in the chest above the router and launch the region updaters in each region to regenerate them. local updaters are not needed in this case. Books from 1.7 world will cause NullPointerExceptions if you forget to remove them.

If the brackets were removed from the signs during the upgrade to 1.8, set FixBroken18 to true in config.yml to fix them automatically when the carts pass on them.

thiefa commented 9 years ago

hi catageek, thank you for your effort on that :)

i cant download, seems the file name or location are wrong.. im getting an 404. "Error 404 - Not found

Le fichier requis n'a pas été trouvé. Il peut s'agir d'une erreur technique. Veuillez réessayer ultérieurement. Si vous ne pouvez pas accéder au fichier après plusieurs tentatives, cela signifie qu'il a été supprimé. "

catageek commented 9 years ago

the link was fixed

catageek commented 9 years ago

I advise strongly to backup your world because existing books are causing issues and I had to restore. An old ticket corrupted a chunk. It is mandatory to destroy all books because they are too unstable.

thiefa commented 9 years ago

oki, will test on a copy.. thanks for the reminder

dwi commented 9 years ago

@catageek: Can we delete all corrupted books somehow with updater? We have quite a lot of routers and stations (http://map.majncraft.cz/?worldname=world_nether&mapname=nether&zoom=4&x=-145&y=64&z=-335) and I can't imagine removing books one by one :(

thiefa commented 9 years ago

@dewick:

nice network.. mines on http://pia.hopto.org:8123 you have to look underground and keep seeing the straight tunnels...

how did you manage to color the trainlines??? want that to :D

dwi commented 9 years ago

@thiefa: Thanks, these are just lines drawn from dynmap by using dmarker one by one by one guy :)

thiefa commented 9 years ago

oh.. sounds like pain in the *\ :D

hoped you maybe manged to get somehow http://dev.bukkit.org/bukkit-plugins/dyntrack/ working, as this should exactly do that ;)

catageek commented 9 years ago

@dewick here is a new snapshot that tries to detect corrupted books and remove them.

Try it with an updater: it should not trigger NullPointerException and put a readable book in the chest.

I already saw your network by googling Bytecart. I also saw your DNS, and I always wonder why you did not use the API to catch name resolution request (check this).

catageek commented 9 years ago

Hmmm... Everything go to the garbage collector now, except updaters. Expect some new fix later.

thiefa commented 9 years ago

true for your first update

cant say for the second one, right now running the updater with some routers that i didnt have removed the books to check if it works well.

oke, it changes old books without any troubles in to new ones :) even after a restart all chunks where fine, so i think its pretty save.. but as you said, all carts go collector

doing an entire network update on my 1.8 copy of the backup right now.

catageek commented 9 years ago

new snapshot that fix the routing layers. Books have now color codes automatically inserted, and it broke the tickets decoding. Stripping color codes fix it.

Everything is OK now ?

thiefa commented 9 years ago

hi, yes seems all to work just fine. i give it a go for public release :)

thank you so very mutch :)

1.8, here i am ;)

PS: any way to show my thankfullness?

dwi commented 9 years ago

Not working for us, our bcupdater keeps glitching, looping and ranomly stopping. But I guess it is not ByteCarts fault, but we have some malfunction designs on our BC network that needs to be fixed first :)

Thanks catgeek!

btw.: could you add some kind of detailed info for messages like these? "Tilted sign found. Please straight it up in the axis of the track" - At least world coordinates so we can find issues faster.

thiefa commented 9 years ago

@dewick: im sure i saw the coordinates for the wrongly orientated signs when mine was screwed. if i remember right ( sorry, i could be wrong, quite some time ago..) it was pretty mutch at the bottom of the error.

@catageek: to add to dewick's wish: a way to find the updaters on track would be nice. either a command to get coordinates of the updater, like "bcupdater region x / backbone where" or kinda placing fakeplayers in the updaters, that are called like the updater so dynmap shows those "players" on the map.

id prefer both at once :D

would make finding updaters easier, if one gets stuck, or to check if a reseter stil is on track. dynmap has a pluginin to show carts, but that only goes for moving ones, and if an updater is stuck for some reason (glitched out in corners, stuck in corners...) it wont be displayed anymore.

its alot work checking every singel tunnel to be sure theres nothing on track anymore.

dwi commented 9 years ago

@thiefa A little helpful is https://github.com/webbukkit/Dynmap-Diag addon for Dynmap. It shows loaded chunks, so if you are lucky, you can somehow track down where bcupdater could be riding at the moment. But it is really inaccurate and hunting down moving updater is really pain in the ass :p

RE: "its alot work checking every singel tunnel to be sure theres nothing on track anymore" It's too damn bad you can set up storage minecart to some kind of ghost cart, that wouldn't collide to mobs/players/other carts so bcupdater would go through the whole network without interrupting :)

thiefa commented 9 years ago

@dewick dynmap-mobs http://dev.bukkit.org/bukkit-plugins/dynmap-mobs/ does exactly that.. it shows a cart icon on map and gets updated like moving players (a little less frequent), so everyone can track the cart. thats nice and alot helpfull aslong as the cart is moving, but the cart will vanish from the map if its not moving anymore for what reason ever, and thats where the troubel starts..

just startet an updater on my track, you can go look on the dynmap to see if you can find it :P

catageek commented 9 years ago

@dewick message for tilted signs was added in the release. Also, I have an updater that is turning in my network since yesterday without problem, so your problem is not the plugin.

@thiefa You or someone else already asked me that, and I did not have time to implement it. IIRC it is not so easy, that's why it is not done yet.

dwi commented 9 years ago

@thiefa Just one interresting thing I made. I recorded updater for ~10hours and made a timelapse video (thanks to loaded chunks and dynmap-mobs plugin). It looks kinda interresting how the updater is driving around the network :D

https://www.youtube.com/watch?v=EWMuOu2La1Y

thiefa commented 9 years ago

cool vid :) i often watched the updater on my dynmap, but it looks really nice this way :)

catageek commented 9 years ago

Nice !

I will take the opportunity of this thread to talk about another topic: A server community that I had known some time ago wants to reboot its map. They need a transit system but are afraid about ByteCart that they find complicated.

http://stonelegion.com/threads/stone-legion-reborn-looking-for-ideas-and-suggestions.2698/

May I suggest you to create an account on their forum a put a testimonial message on how you managed the project internally since the beginning ? How many people did participate to build the network ? Were they skilled in networking ? I can't talk about these points myself.

Otherwise use this thread to testify, and I will link your message, but it will difficult to open a discussion.

Thanks a lot in advance !