Skip to content

Commit

Permalink
Add a note with regard to the behaviour of the WorldWrappingMutator a…
Browse files Browse the repository at this point in the history
…nd its weird getter behavior.
  • Loading branch information
marchermans committed Jul 8, 2022
1 parent 0e28607 commit e96b1ca
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ public interface IStateAccessor
{
/**
* Gets the target state in the current area, using the offset from the area as well as the in area target offset.
* Note if this accessor potentially targets more than 1 block position (even if it does not in reality the potential is what matters here)
* you will need to pass in the world position exactly.
*
* If this accessor can not potentially ever target more than 1 block position, you can pass in the relative position.
* This is a nasty implementation detail, and matters most when you are making new chisel or pattern placement modes!
*
* @param inAreaTarget The in area offset.
* @return An optional potentially containing the state entry of the requested target.
Expand All @@ -19,6 +24,11 @@ Optional<IStateEntryInfo> getInAreaTarget(

/**
* Gets the target state in the current area, using the in area block position offset as well as the in block target offset to calculate the in area offset for setting.
* Note if this accessor potentially targets more than 1 block position (even if it does not in reality the potential is what matters here)
* you will need to pass in the world position exactly.
*
* If this accessor can not potentially ever target more than 1 block position, you can pass in the relative position.
* This is a nasty implementation detail, and matters most when you are making new chisel or pattern placement modes!
*
* @param inAreaBlockPosOffset The offset of blocks in the current area.
* @param inBlockTarget The offset in the targeted block.
Expand Down

0 comments on commit e96b1ca

Please sign in to comment.