Use argument object for survival autoplace#13
Merged
Conversation
Contributor
|
Warning: 2 uncommitted changes |
Contributor
|
Warning: 2 uncommitted changes |
Contributor
|
Warning: 2 uncommitted changes |
Contributor
Author
|
Seems good now. |
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.
New Feature
AutoPlaceEnvironment#isContainedInPiece. This allow the structure element to determine if any coordinate is contained within structure. Currently, this means if given coordinate is not literal' 'in addShape()Impact
Migrations required for client code
IStructrueElement
Reusable IStructrueElement subclass should override the default shim code for survivalPlaceBlock's new overload while keeping the old overload functional.
Single purpose IStructrueElement subclass should override the default shim code for survivalPlaceBlock's new overload. The old overload can be removed or made to throw an AssertionError or UnsupportedOperationException.
Decorating IStructrueElement (e.g. ofChain) should override both survivalPlaceBlock, and call the backing IStructureElement's survivalPlaceBlock whichever overload it was called from.
IStructureDefinition
IStructureDefinition users are encouraged, but not required, to use the new survivalBuild api. The new overload allows passing in EntityPlayer instead of EntityPlayerMP to allow NEI
ISurvivalConstructable
ISurvivalConstructable Implementor should implement the new survivalConstruct to allow third party tools (e.g. NEI addon) to use this API on client side, without the presence of a server.
Mentions
@Quarri6343 This includes the necessary API change for accepting EntityPlayer to survivalPlaceBlock. I did some hack here to ensure the existing multis can use EntityPlayer without any code changes. Please check if this satisfy your needs in the NEI handler you are developing.
Reviews
I'm not asking for a review here, but I will happily accept it if you want to do so.