Suspected duplication bug when trains shot by skeleton.
Nocty201 opened this issue · 19 comments
I haven't personally seen this, but one of the players on my server tells me that if a skeleton shoots a train engine (but not a car) then it will duplicate and pop out.
I'll try to confirm this and get some video showing it when I'm able.
Thanks!
Currently on 4.3.0-005, but will be updating to 007 very soon so apologies if this is already fixed.
(edit) Users have found some duplicated wagons as well, we're suspecting they also dupe when shot.
That's strange.. With the latest release skeletons shouldn't be able to destroy the train.
The duplication could be something on our and there is a higher chance that another mod is interacting with the entities.
I have dealt with a similar glitch in 007, so it might actually be fixed indirectly with that version. And from my tests I can't replicate the error, so if you can let me know any results you get from testing in 007 that would be great.
If it helps any the error i had fixed was specifically for skeletons as the damage source, it had nothing to do with projectiles.
i know the mob greifing was one way to dupe the trains with explosions, its an issue with the destruction code as a whole being handled by two separate events, the train survives but still registers that it was supposed to have blown up, so it drops the item. That I'm unsure how to deal with.
But dropping two items, that's another issue.
You are correct to the core stuff anyway.
it takes damage, then defines how much, if its past a set point within a set timeframe then it fires off several events based on different listeners that will activate at different timeframes.
One drops the items and the inventory contents, this happens first because later on the variables don't exist.
The next attempts to unlink it from any other rollingstock or trains.
The next attempts to set the bogies as dead, assuming there are any. This way minecraft can manage cleaning up the entity and all it's data from the world.
We then proceed to manually remove the bogies because we don't want to wait till server restart.
Then we repeat that for the main entity.
Theres a few other things that fire off inbetween that stuff, but I can't exactly remember what or where.
It's all event and/or packet based so it's difficult to find and deal with all the related stuff, if we rework the system and something gets missed, it's the tenders all over again.
I am going to take the damage stuff into consideration with the rewrite though. I'll have to expand it because there are more types of trains, and the diesel idea i wanna look into further first.
Things got in the way for testing and I haven't been able to do any yet - my apologies.
I'll leave the code stuff for you guys, as mentioned I can't do java/MCJava so suspect taht other than high level concepts have nothing to add. And you probably have enough to do without my suggestions anyway!
I have asked the other players to retest/monitor what happens, but have had nothing from them yet.
I did some really quick testing in SSP using my pack, and spawned in a ring track (with straights) and placed a bullet train on it.
Spawned some skeletons, sat in the train. Turned off creative mode, and got shot at. A lot.
Seemed to lose the engine (eventually) rather than dupe it - perhaps one of the skeletons was picking it up but I couldn't see it. I replaced it, let it sit where it would get shot at, and it eventually was knocked off and appeared to despawn.
Very curious. I... uhh... Don't know what to say, and still no word from the other players.
on our server we have duplicating problem too
any destroying of loco duplicated it.
Something else that makes me wonder, does this happen on vanilla servers or is it another dupe glitch that's specifically related to Cauldron/Thermos/etc?
Offline, sometimes when I lag while destroying a tender, it explodes. Into 30+ tenders. (item) Spent quite a while destroying all of them. No screenshots though.
Optifine is just a rendering mod.... There's no way that should be able to create a dupe glitch.
I have reports of the same issue on my Vanilla/Forge server. [Edit - this is with Traincraft-4.3.0_005 I'll be testing with the newest _007 version tonight]
Skeleton shot duplicates trains. So does player throwing a Tinkers shuriken at it. I'm unable to reproduce it in SSP, though.
(Edit: I should mention that I've not been able to duplicate a train using a Tinker's pick)
I'll see if I can reproduce it on the server and give you the exact means of reliably reproducing it.