mirror of https://github.com/FabricMC/yarn.git
Yet more obscure stuff (#2323)
* Map some incidental fields * Map the very hard to understand (unused) class. Name is WIP. Mahjong pls. * ExpandingLongLinkedOpenHashSet -> LinkedBlockPosHashSet + docs * Fix typo * Apply suggestions from code review Co-authored-by: YanisBft <doublecraft.official@gmail.com> * Update mappings/net/minecraft/util/collection/LinkedBlockPosHashSet.mapping Co-authored-by: YanisBft <doublecraft.official@gmail.com>
This commit is contained in:
parent
302c9c2a30
commit
a00c699024
|
@ -2,6 +2,7 @@ CLASS net/minecraft/class_2361 net/minecraft/util/collection/IdList
|
|||
FIELD field_11098 list Ljava/util/List;
|
||||
FIELD field_11099 nextId I
|
||||
FIELD field_11100 idMap Ljava/util/IdentityHashMap;
|
||||
FIELD field_33088 NULL_ID I
|
||||
METHOD <init> (I)V
|
||||
ARG 1 initialSize
|
||||
METHOD method_10203 set (Ljava/lang/Object;I)V
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
CLASS net/minecraft/class_6136 net/minecraft/util/collection/LinkedBlockPosHashSet
|
||||
COMMENT Represents a set of block positions (long representation).
|
||||
COMMENT <p>
|
||||
COMMENT Uses a {@link Long2LongLinkedOpenHashMap} as its internal storage medium
|
||||
COMMENT to facilitate the quick addition and removal of block positions.
|
||||
COMMENT <p>
|
||||
COMMENT Positions are index into a 2x cubed area that then stores as a long, a bitset
|
||||
COMMENT representing which positions within that area are currently set.
|
||||
COMMENT <p>
|
||||
COMMENT This has two major advantages:
|
||||
COMMENT <ol>
|
||||
COMMENT <li>Positions that are geometrically close together are grouped together in memory. This localises adjacent reads and writes.</li>
|
||||
COMMENT <li>A larger number of positions can be comprised together into one long allowing for a smaller memory footprint.</li>
|
||||
COMMENT </ol>
|
||||
COMMENT @see LevelPropagator
|
||||
FIELD field_31715 buffer Lnet/minecraft/class_6136$class_6137;
|
||||
METHOD <init> (IF)V
|
||||
ARG 1 expectedSize
|
||||
ARG 2 loadFactor
|
||||
METHOD add (J)Z
|
||||
COMMENT Marks a block position as "set".
|
||||
ARG 1 posLong
|
||||
METHOD isEmpty ()Z
|
||||
COMMENT Checks whether there are any block positions that have been "set".
|
||||
COMMENT
|
||||
COMMENT @return {@code true} is this collection is empty.
|
||||
METHOD rem (J)Z
|
||||
COMMENT Marks a block position as "not set". Effectively removing it from this collection.
|
||||
ARG 1 posLong
|
||||
METHOD removeFirstLong ()J
|
||||
COMMENT Pops first block position off of this set.
|
||||
METHOD size ()I
|
||||
COMMENT @throws UnsupportedOperationException
|
||||
CLASS class_6137 Storage
|
||||
COMMENT Represents a three-dimensional mapping from a block position to a bitset
|
||||
COMMENT of values set at that position.
|
||||
FIELD field_31716 STARTING_OFFSET I
|
||||
FIELD field_31717 HORIZONTAL_COLUMN_BIT_SEPARATION I
|
||||
FIELD field_31718 FIELD_SPACING I
|
||||
FIELD field_31719 Y_BIT_OFFSET I
|
||||
FIELD field_31720 X_BIT_OFFSET I
|
||||
FIELD field_31721 Z_BIT_OFFSET I
|
||||
FIELD field_31722 MAX_POSITION J
|
||||
FIELD field_31723 lastWrittenIndex I
|
||||
FIELD field_31724 lastWrittenKey J
|
||||
FIELD field_31725 expectedSize I
|
||||
METHOD <init> (IF)V
|
||||
ARG 1 expectedSize
|
||||
ARG 2 loadFactor
|
||||
METHOD method_35481 removeFirstLong ()J
|
||||
METHOD method_35482 setBits (IJ)Z
|
||||
COMMENT Sets flags within a specific 2x cubed region represented by {@code index}.
|
||||
COMMENT
|
||||
COMMENT @return {@code true} if the map already contained set bits for the indicated mask
|
||||
COMMENT (i.e. an overlap occurred)
|
||||
ARG 1 index
|
||||
COMMENT zero-based index of a 2x cubed area
|
||||
ARG 2 mask
|
||||
COMMENT mask of bits to set
|
||||
METHOD method_35483 getKey (J)J
|
||||
COMMENT Converts a individual position into a key
|
||||
COMMENT representing the 2x cube region containing that position.
|
||||
ARG 0 posLong
|
||||
METHOD method_35484 getBlockPosLong (JI)J
|
||||
ARG 0 key
|
||||
ARG 2 valueLength
|
||||
METHOD method_35485 unsetBitsAt (IJ)Z
|
||||
COMMENT Unsets flags within a specific 2x cubed region contained within this map.
|
||||
COMMENT
|
||||
COMMENT @return {@code true} if the collection was changed as a result of this call
|
||||
ARG 1 index
|
||||
ARG 2 mask
|
||||
METHOD method_35486 getBlockOffset (J)I
|
||||
COMMENT Gets a position's index relative to its containing 2x cube region
|
||||
ARG 0 posLong
|
||||
METHOD method_35487 add (J)Z
|
||||
COMMENT Ensures that this collection contains the specified element (optional operation).
|
||||
COMMENT
|
||||
COMMENT @see Collection#add(Object)
|
||||
ARG 1 posLong
|
||||
METHOD method_35488 rem (J)Z
|
||||
COMMENT Removes a block position from this map.
|
||||
ARG 1 posLong
|
||||
METHOD method_35489 unsetBits (J)Z
|
||||
COMMENT Unsets flags within the last 2x cubed region contained within this map.
|
||||
COMMENT <p>
|
||||
COMMENT This is equivalent to the call {@code unsetBitsAt(this.n, mask)}
|
||||
COMMENT
|
||||
COMMENT @return {@code true} if the collection was changed as a result of this call
|
||||
ARG 1 mask
|
||||
METHOD rehash (I)V
|
||||
ARG 1 newN
|
|
@ -2,6 +2,7 @@ CLASS net/minecraft/class_4706 net/minecraft/util/collection/SortedArraySet
|
|||
FIELD field_21562 comparator Ljava/util/Comparator;
|
||||
FIELD field_21563 elements [Ljava/lang/Object;
|
||||
FIELD field_21564 size I
|
||||
FIELD field_29860 DEFAULT_CAPACITY I
|
||||
METHOD <init> (ILjava/util/Comparator;)V
|
||||
ARG 1 initialCapacity
|
||||
ARG 2 comparator
|
||||
|
@ -25,6 +26,11 @@ CLASS net/minecraft/class_4706 net/minecraft/util/collection/SortedArraySet
|
|||
ARG 1 index
|
||||
METHOD method_23871 get (I)Ljava/lang/Object;
|
||||
ARG 1 index
|
||||
METHOD method_34958 create ()Lnet/minecraft/class_4706;
|
||||
METHOD method_34959 create (Ljava/util/Comparator;)Lnet/minecraft/class_4706;
|
||||
METHOD method_34960 create (Ljava/util/Comparator;I)Lnet/minecraft/class_4706;
|
||||
ARG 1 initialCapacity
|
||||
METHOD method_34961 getIfContains (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
METHOD method_34962 last ()Ljava/lang/Object;
|
||||
CLASS class_4707 SetIterator
|
||||
FIELD field_21566 nextIndex I
|
||||
|
|
|
@ -4,6 +4,7 @@ CLASS net/minecraft/class_3554 net/minecraft/world/chunk/light/LevelPropagator
|
|||
FIELD field_15783 levelCount I
|
||||
FIELD field_15784 pendingUpdates Lit/unimi/dsi/fastutil/longs/Long2ByteMap;
|
||||
FIELD field_15785 pendingIdUpdatesByLevel [Lit/unimi/dsi/fastutil/longs/LongLinkedOpenHashSet;
|
||||
FIELD field_31706 MAX_LEVEL I
|
||||
METHOD <init> (III)V
|
||||
ARG 1 levelCount
|
||||
ARG 2 expectedLevelSize
|
||||
|
|
Loading…
Reference in New Issue