mirror of https://github.com/FabricMC/yarn.git
PortalUtil -> BlockLocating, and findColumnEnd (#2514)
Fixes #2510 Signed-off-by: liach <liach@users.noreply.github.com> Co-authored-by: liach <liach@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
91c7aa7036
commit
ab850df1d7
|
@ -1,4 +1,5 @@
|
|||
CLASS net/minecraft/class_5459 net/minecraft/world/PortalUtil
|
||||
CLASS net/minecraft/class_5459 net/minecraft/world/BlockLocating
|
||||
COMMENT A few utilities to find block positions matching certain conditions.
|
||||
METHOD method_30574 getLargestRectangle (Lnet/minecraft/class_2338;Lnet/minecraft/class_2350$class_2351;ILnet/minecraft/class_2350$class_2351;ILjava/util/function/Predicate;)Lnet/minecraft/class_5459$class_5460;
|
||||
COMMENT Gets the largest rectangle of blocks along two axes for which all blocks meet a predicate.
|
||||
COMMENT Used for getting rectangles of Nether portal blocks.
|
||||
|
@ -7,7 +8,11 @@ CLASS net/minecraft/class_5459 net/minecraft/world/PortalUtil
|
|||
ARG 2 primaryMaxBlocks
|
||||
ARG 3 secondaryAxis
|
||||
ARG 4 secondaryMaxBlocks
|
||||
ARG 5 predicate
|
||||
METHOD method_30575 moveWhile (Ljava/util/function/Predicate;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_2350;I)I
|
||||
ARG 0 predicate
|
||||
ARG 1 pos
|
||||
ARG 2 direction
|
||||
ARG 3 max
|
||||
METHOD method_30576 findLargestRectangle ([I)Lcom/mojang/datafixers/util/Pair;
|
||||
COMMENT Finds the largest rectangle within a histogram, where the vertical bars each have
|
||||
|
@ -30,6 +35,23 @@ CLASS net/minecraft/class_5459 net/minecraft/world/PortalUtil
|
|||
COMMENT Rectangle in Histogram - LeetCode</a>
|
||||
ARG 0 heights
|
||||
COMMENT the heights of bars in the histogram
|
||||
METHOD method_34851 findColumnEnd (Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2350;Lnet/minecraft/class_2248;)Ljava/util/Optional;
|
||||
COMMENT Finds an end to a block column starting from {@code pos} extending in {@code
|
||||
COMMENT direction}. Within the column, the block states must be of {@code intermediateBlock}
|
||||
COMMENT and the ending block state, whose position is returned, must be of {@code endBlock}.
|
||||
COMMENT
|
||||
COMMENT @return the end position of the block column where a {@code endBlock} lays, or
|
||||
COMMENT an empty optional if no such column exists
|
||||
ARG 0 world
|
||||
COMMENT the world the column is in
|
||||
ARG 1 pos
|
||||
COMMENT the starting position of the column
|
||||
ARG 2 intermediateBlock
|
||||
COMMENT the blocks that the column must be of, excluding the end
|
||||
ARG 3 direction
|
||||
COMMENT the direction which the column extends to
|
||||
ARG 4 endBlock
|
||||
COMMENT the ending block of the column
|
||||
CLASS class_5460 Rectangle
|
||||
FIELD field_25936 lowerLeft Lnet/minecraft/class_2338;
|
||||
FIELD field_25937 width I
|
Loading…
Reference in New Issue