Package net.minecraft.util.collection
Class LinkedBlockPosHashSet
java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongSet
it.unimi.dsi.fastutil.longs.AbstractLongSortedSet
it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet
net.minecraft.util.collection.LinkedBlockPosHashSet
- All Implemented Interfaces:
- Hash,- LongBidirectionalIterable,- LongCollection,- LongIterable,- LongSet,- LongSortedSet,- Serializable,- Cloneable,- Iterable<Long>,- Collection<Long>,- SequencedCollection<Long>,- SequencedSet<Long>,- Set<Long>,- SortedSet<Long>
Represents a set of block positions (long representation).
 
 Uses a Long2LongLinkedOpenHashMap as its internal storage medium
 to facilitate the quick addition and removal of block positions.
 
Positions are index into a 2x cubed area that then stores as a long, a bitset representing which positions within that area are currently set.
This has two major advantages:
- Positions that are geometrically close together are grouped together in memory. This localizes adjacent reads and writes.
- A larger number of positions can be comprised together into one long allowing for a smaller memory footprint.
- See Also:
- Mappings:
- Namespace - Name - named - net/minecraft/util/collection/LinkedBlockPosHashSet- intermediary - net/minecraft/class_6136- official - exv
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classRepresents a three-dimensional mapping from a block position to a bitset of values set at that position.Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.HashHash.Strategy<K>
- 
Field SummaryFieldsFields inherited from class it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSetcontainsNull, f, first, key, last, link, mask, maxFill, minN, n, sizeFields inherited from interface it.unimi.dsi.fastutil.HashDEFAULT_GROWTH_FACTOR, DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR, FAST_LOAD_FACTOR, FREE, OCCUPIED, PRIMES, REMOVED, VERY_FAST_LOAD_FACTOR
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanadd(long posLong) Marks a block position as "set".booleanisEmpty()Checks whether there are any block positions that have been "set".booleanrem(long posLong) Marks a block position as "not set".longPops first block position off of this set.intsize()Methods inherited from class it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSetaddAll, addAll, addAndMoveToFirst, addAndMoveToLast, clear, clone, comparator, contains, ensureCapacity, firstLong, fixPointers, fixPointers, forEach, hashCode, headSet, iterator, iterator, lastLong, of, of, of, of, of, rehash, remove, removeLastLong, shiftKeys, spliterator, subSet, tailSet, toSet, toSetWithExpectedSize, trim, trimMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongSetequalsMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollectionadd, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArray, toStringMethods inherited from class java.util.AbstractCollectiontoArray, toArrayMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectiontoArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongCollectioncontainsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterableforEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.longs.LongSortedSetfirst, headSet, last, subSet, tailSetMethods inherited from interface java.util.Setadd, contains, containsAll, equals, remove, removeAll, retainAll, toArray, toArrayMethods inherited from interface java.util.SortedSetaddFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
- 
Field Details- 
buffer- Mappings:
- Namespace - Name - Mixin selector - named - buffer- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;buffer:Lnet/minecraft/util/collection/LinkedBlockPosHashSet$Storage;- intermediary - field_31715- Lnet/minecraft/class_6136;field_31715:Lnet/minecraft/class_6136$class_6137;- official - a- Lexv;a:Lexv$a;
 
 
- 
- 
Constructor Details- 
LinkedBlockPosHashSetpublic LinkedBlockPosHashSet(int expectedSize, float loadFactor) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;<init>(IF)V- intermediary - <init>- Lnet/minecraft/class_6136;<init>(IF)V- official - <init>- Lexv;<init>(IF)V
 
 
- 
- 
Method Details- 
addpublic boolean add(long posLong) Marks a block position as "set".- Specified by:
- addin interface- LongCollection
- Overrides:
- addin class- LongLinkedOpenHashSet
- Mappings:
- Namespace - Name - Mixin selector - named - add- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;add(J)Z- intermediary - add- Lnet/minecraft/class_6136;add(J)Z- official - add- Lexv;add(J)Z
 
- 
rempublic boolean rem(long posLong) Marks a block position as "not set". Effectively removing it from this collection.- Specified by:
- remin interface- LongCollection
- Specified by:
- remin interface- LongSet
- Overrides:
- remin class- AbstractLongSet
- Mappings:
- Namespace - Name - Mixin selector - named - rem- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;rem(J)Z- intermediary - rem- Lnet/minecraft/class_6136;rem(J)Z- official - rem- Lexv;rem(J)Z
 
- 
removeFirstLongpublic long removeFirstLong()Pops first block position off of this set.- Overrides:
- removeFirstLongin class- LongLinkedOpenHashSet
- Mappings:
- Namespace - Name - Mixin selector - named - removeFirstLong- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;removeFirstLong()J- intermediary - removeFirstLong- Lnet/minecraft/class_6136;removeFirstLong()J- official - removeFirstLong- Lexv;removeFirstLong()J
 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<Long>
- Specified by:
- sizein interface- Set<Long>
- Overrides:
- sizein class- LongLinkedOpenHashSet
- Throws:
- UnsupportedOperationException
- Mappings:
- Namespace - Name - Mixin selector - named - size- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;size()I- intermediary - size- Lnet/minecraft/class_6136;size()I- official - size- Lexv;size()I
 
- 
isEmptypublic boolean isEmpty()Checks whether there are any block positions that have been "set".- Specified by:
- isEmptyin interface- Collection<Long>
- Specified by:
- isEmptyin interface- Set<Long>
- Overrides:
- isEmptyin class- LongLinkedOpenHashSet
- Returns:
- trueis this collection is empty.
- Mappings:
- Namespace - Name - Mixin selector - named - isEmpty- Lnet/minecraft/util/collection/LinkedBlockPosHashSet;isEmpty()Z- intermediary - isEmpty- Lnet/minecraft/class_6136;isEmpty()Z- official - isEmpty- Lexv;isEmpty()Z
 
 
-