Traincraft

Traincraft

1M Downloads

Dupe-Bug in Traincraft-4.3.2-009

TheBlueCrystal opened this issue ยท 2 comments

commented

Hello everyone,
there is a duplication-bug in the latest release of Traincraft that affects any rolling stock that is not a locomotive or a passenger cart.

In /train/common/api/EntityRollingStock.java function attackEntityFrom() (on Line 387+) you've put code to drop the cart as an item, if it's not a locomotive. However this method gets overridden in every implementation of rolling stock and in every overridden function (except for IPassenger implementers) there is a super-call AND the same dropCartAsItem call. So except for locomotives / passenger-carts you get two item drops for breaking one rolling stock entity.

A wild guess would be that this line should read "if(this instanceof IPassenger) {".

Could you please have a look at that code? That would be great. :)
Many thanks in advance! :)

commented

This is quite the impressive issue thread you've opened.
You're notes made this VERY easy to fix.
The fix will be in the 010 hotfix release.

commented

Thank you very much! :)
I'm glad that I could be of help. :)