bergerhealer / TrainCarts

Minecarts redefined
MIT License
205 stars 63 forks source link

Redstone torch bug #431

Closed houtknots closed 3 years ago

houtknots commented 3 years ago

Info

Please provide the following information:


Bug

Description

When placing a redstone torch next to a destination sign we see error messages pop-up within the server console.

[12:29:18 ERROR]: [Train_Carts] Failed to execute REDSTONE_ON for SignActionDestination:
java.lang.NullPointerException: Cannot invoke "org.bukkit.block.Block.getWorld()" because "block" is null
        at com.bergerkiller.bukkit.common.BlockLocation.<init>(BlockLocation.java:38) ~[BKCommonLib-1.17.1-v3-1117.jar:?]
        at com.bergerkiller.bukkit.tc.pathfinding.PathNode.getOrCreate(PathNode.java:83) ~[TrainCarts-1.17.1-v1-941.jar:?]
        at com.bergerkiller.bukkit.tc.pathfinding.PathNode.getOrCreate(PathNode.java:61) ~[TrainCarts-1.17.1-v1-941.jar:?]
        at com.bergerkiller.bukkit.tc.signactions.SignActionDestination.execute(SignActionDestination.java:73) ~[TrainCarts-1.17.1-v1-941.jar:?]

Steps to reproduce

Place a redstone torch next to a destination sign (Other signs not tested): https://youtu.be/xCcnC_hGZXo

bergerkiller commented 3 years ago

Are there no rails the sign is coupled to? Seems like that would trigger this.

heras1 commented 3 years ago

This is the setup that is used here. The track is a diagonal section which continues a bit more to both sides
afbeelding

bergerkiller commented 3 years ago

This might be a bug finding the rails in this setup then. If you remove the sign post and put the rails on top of the block does the error go away?

houtknots commented 3 years ago

@bergerkiller It indeed was the sign in the middle, when we place wall signs the issue does not occur.

Video: https://youtu.be/0L1fPcTX3wM

bergerkiller commented 3 years ago

https://ci.mg-dev.eu/job/TrainCarts/948/ probably fixed now

houtknots commented 3 years ago

@bergerkiller, The issue is indeed fixed but with the new version TC Coasters doesn't work, When it type /tcc give nothing happens and no logs show.

I tried it on two different servers with the same result

bergerkiller commented 3 years ago

That's a bit strange, that commit changed nothing about the api that would cause this. Are you sure there's no logs? The /tcc is a main command and if it does 'nothing' then I would at least expect something in the server log about it. Or there's another plugin that also registers /tcc, in which case you can try and see if /tccoasters does anything.

houtknots commented 3 years ago

In the video below you see what I see in Minecraft and in the server console:

https://jhcsmedia.com/?f=2021-09-24-SsQbDaAcK3HrmqXd.mp4

bergerkiller commented 3 years ago

Recent versions have changed it to be clearer, check the server log and search for: Loading TCCoasters v1.17.1-

Around there should be an error of what's going wrong. You can also update BKCommonLib and TC-Coasters to these versions on jenkins: https://ci.mg-dev.eu/job/TC%20Coasters/215/ https://ci.mg-dev.eu/job/BKCommonLib/1121/

which will provide an option to upload the error log to pastebin. (if it doesnt also just work)

houtknots commented 3 years ago

Updating everything to the Snapshot version as you suggested works like a charm. All errors are gone and TCCoaster also works again.

bergerkiller commented 3 years ago

Most likely it was a bug in the preloader, some people had that. Thanks for confirming :)