Support fluid block placement in Schematicannon#10579
Open
SShakusora wants to merge 2 commits into
Open
Conversation
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.
Description
This PR adds fluid placement support to the Schematicannon.
Source fluids in schematics are now tracked as fluid requirements instead of invalid blocks. The cannon can supply those requirements from adjacent fluid handlers, such as tanks, or from fluid-containing item containers. It then places fluids through NeoForge's
FluidUtil.tryPlaceFluid, so vanilla and NeoForge placement rules still apply, including water vaporizing in dimensions where it cannot be placed.Waterloggable blocks are handled as a block item plus a contained fluid requirement. If the fluid is provided, the block is placed and filled. If the new "skip missing fluids" option is enabled and the fluid is unavailable, the cannon can still place the dry block instead of blocking the entire build.
Free-standing source fluids are printed in a dedicated later pass, after normal and deferred structure blocks. This prevents the cannon from launching fluids before the surrounding structure exists, which helps with builds such as fluid containment and cobblestone generator schematics.
Changes
ItemRequirementandMaterialChecklist.IFluidHandlers andIFluidHandlerItemcontainers.skipMissingFluidSchematicannon option and UI/status text for missing or skipped fluids.Either<ItemStack, FluidStack>icons.Notes
This is a continuation of the earlier draft PR:
The previous review raised a few specific concerns that this version addresses: