New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AE2 blocks not updating comparators #446

Closed
yueh opened this Issue Nov 16, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@yueh
Member

yueh commented Nov 16, 2014

Most (or all?) AE2 blocks with inventories are not updating attached comparators if the inventory is changed through any automation.

This only happens with a forced update through an adjacent block.

@yueh yueh added the type-bug label Nov 16, 2014

@AlgorithmX2

This comment has been minimized.

Show comment
Hide comment
@AlgorithmX2

AlgorithmX2 Nov 16, 2014

Contributor

Which automation? AE2 automation? I'm pretty sure that comparators update when you call "TileEntity.markDirty()" or whatever its called.

Contributor

AlgorithmX2 commented Nov 16, 2014

Which automation? AE2 automation? I'm pretty sure that comparators update when you call "TileEntity.markDirty()" or whatever its called.

@yueh

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Nov 16, 2014

Member

Currently looking through the blocks. Looks like it does not work with at least with

  • Both IO Ports
  • Grindstone
  • Interface
  • Drive
  • Vibration Chamber

Cannot really test the ME chest.

It looks like it is related to AE2 automation. Simple setup with an interface as buffer and a storage bus facing one of the AE2 blocks. If I use a hopper to insert any items it works just fine.

Already found out, that calling TileEntity.markDirty() in onChangeInventory() it will solve it.
The question is more, how could this affect the performance.
It is probably fine for things like the IO Ports or Grindstone, but chaning it for an interface might have a huge impact.

Member

yueh commented Nov 16, 2014

Currently looking through the blocks. Looks like it does not work with at least with

  • Both IO Ports
  • Grindstone
  • Interface
  • Drive
  • Vibration Chamber

Cannot really test the ME chest.

It looks like it is related to AE2 automation. Simple setup with an interface as buffer and a storage bus facing one of the AE2 blocks. If I use a hopper to insert any items it works just fine.

Already found out, that calling TileEntity.markDirty() in onChangeInventory() it will solve it.
The question is more, how could this affect the performance.
It is probably fine for things like the IO Ports or Grindstone, but chaning it for an interface might have a huge impact.

@AlgorithmX2

This comment has been minimized.

Show comment
Hide comment
@AlgorithmX2

AlgorithmX2 Nov 16, 2014

Contributor

Yes, sadly markDirty is pretty expensive, but it should be called without it the chunk won't be saved and item loss can occur as well. I honestly thought I already touched on this but it may have regressed or maybe I just thought I did.

Contributor

AlgorithmX2 commented Nov 16, 2014

Yes, sadly markDirty is pretty expensive, but it should be called without it the chunk won't be saved and item loss can occur as well. I honestly thought I already touched on this but it may have regressed or maybe I just thought I did.

@yueh

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Nov 17, 2014

Member

Could this no also enable a dupe bug? @FireBall1725 mentioned something about one with a heavily loaded ME system.

I have one case in mind, but cannot check it until tomorrow.

Member

yueh commented Nov 17, 2014

Could this no also enable a dupe bug? @FireBall1725 mentioned something about one with a heavily loaded ME system.

I have one case in mind, but cannot check it until tomorrow.

@thatsIch thatsIch closed this in #464 Nov 19, 2014

thatsIch pushed a commit that referenced this issue Nov 19, 2014

thatsIch
Merge pull request #464 from yueh/fix-446
Added a missing markDirty in AdaptorIInventory to update other inventories on inserting items, fixes #446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment