bergerhealer/TrainCarts

[Bug?] Items in container minecart didn't drop into the hopper

Closed this issue · 19 comments

  • BkCommonLib Version (/train version): 1261
  • TrainCarts Version (/train version): 1107
  • Server Type and Version (/version):Burrito Spigot 1.8.8

Bug

Description

image

image

Items in container minecart didn't drop into the hopper under the rail with Train Carts.
Items drop from container minecart into the hopper under it after breaking the rail on the hopper.

Expected behaviour

Items drop from minecart into hoppers normally.

Steps to reproduce

  1. place hoppers y chests
  2. place golden rail on hoppers
  3. run container carts on that rail
  4. items in container carts wont drop into hoppers

Additional Information

null

tried BK 1289, still. Normal after removed TrainCarts.

In this situation its the responsibility if the hopper block to poll for entities - the hopper minecart is not the one initiating it. So the situation is different. It seems then that either the hopper isnt 'ticking' (paper config?) or the hopper isn't seeing traincarts minecart entities as valid containers to pull from.

This is 1.8.8 though, so theres a lot of possible causes. I wouldnt know without looking into it myself

A stupid question, but as this happened once before-

You didnt change the minecart type in the attachment editor, right? Placed it with an actual storage minecart item?

wdym?
idk is there an attachment editor??

In this situation its the responsibility if the hopper block to poll for entities - the hopper minecart is not the one initiating it. So the situation is different. It seems then that either the hopper isnt 'ticking' (paper config?) or the hopper isn't seeing traincarts minecart entities as valid containers to pull from.

This is 1.8.8 though, so theres a lot of possible causes. I wouldnt know without looking into it myself

Items in container minecart & hopper minecart won't drop into the hopper under it unless there's no rail on the hopper

Does the problem go away when you set train-carts/config.yml optimizeBlockActivation to false?

wdym? idk is there an attachment editor??

If you didnt know about /train attachments, then you didnt do that :p

Now I've disabled optimizeBlockActivation, but it still not workin
360截图20220517234825721
g

and I've found the item drop into the hopper when exit game and rejoin (unload and reload chunk)

Im back home so Ill do some testing. Been a while since i booted up 1.8

Yeah I can see the same on 1.8. Ill look into it

Looks like the issue no longer occurs since MC 1.9, so I'll focus in on any differences 1.8.8 -> 1.9

Problem doesnt happen with Spigot and Paperspigot 1.8.8. But I find that NachoSpigot, which I happened to be using at the time, does. This is because they backported something paper added later, replacing some internal data structure of Chunk.

This likely causes incomplete replacement of the Entity during spawning, and causes it to not find the minecart anymore when searching in a cuboid region above the hopper block.

Fix is hopefully easy, Ill have to see what works best.

ScreenShot 2022-05-17 19 31 43
well that explains a lot

This took me longer to figure out than I like to admit. After decompiling the entire nachospigot jar, I find that all these bugs have to do with changes done by the TacoSpigot base server. The most important change here is that hoppers can be configured not to pull from entities, but to have entities push items to hoppers, which is obviously more efficient.

Further digging into it showed that they crammed a hopper tick inside EntityMinecartContainer class onTick() function, which is obviously overrided by BKCL for controller/tc support. So it never ran.

Calling this method manually inside the onTick() hook seems to have fixed it.

There was another issue on TacoSpigot related to the chunk entity slices, but it was probably minor.

https://ci.mg-dev.eu/job/BKCommonLib/1291/

I though it's a taco problem too, let me test this build

2022-05-18_11 01 03
It looks like working fine now. THX for ur support.