properly initialize metaTileEntityTank fluid inventory#1311
Closed
PrototypeTrousers wants to merge 1 commit intoGregTechCE:masterfrom
Closed
properly initialize metaTileEntityTank fluid inventory#1311PrototypeTrousers wants to merge 1 commit intoGregTechCE:masterfrom
PrototypeTrousers wants to merge 1 commit intoGregTechCE:masterfrom
Conversation
Member
|
Thank you for your hard work. But this is just partial copy of functionality from #1303 right? As that one have even proper tank forming on load when cover was placed on it. |
Contributor
Author
|
Yes, this fixes ONLY the crash, and as its world breaking i thought this part could go first. |
Contributor
Author
|
closing in favor of #1313 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Suggested Fix for #1289 and #1263
Separated from PR #1303
those issues happen due to metaTileEntityTank fluid inventory not being properly initialised on load.
How solved:
calling this.fluidInventory = getActualFluidTank();
instead of initializeInventory();
instead of initializeInventory() is a metaTileEntity method that initialize fluidinventory as
this.fluidInventory = new FluidHandlerProxy(importFluids, exportFluids);but we have neither
importFluidsnorexportFluidson meta tile entities tanks, leadingto
getTankProperties().lengthbeing 0, so when the tank is asked by the cover for its capability, null is returned.Since the pump need the capability to be non null, it crashes
Outcome:
World loading normally