1.18-pre4 structure locating (#2859)

* 1.18-pre4 structure locating

* Remove conflict with #2855

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
apple502j 2021-11-23 01:08:36 +09:00 committed by GitHub
parent 268324fe32
commit 7fcda1ad9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 124 additions and 2 deletions

View File

@ -106,6 +106,7 @@ CLASS net/minecraft/class_3215 net/minecraft/server/world/ServerChunkManager
ARG 1 simulationDistance
METHOD method_38784 (Lnet/minecraft/class_3215$class_6635;)V
ARG 0 chunk
METHOD method_39777 getChunkIoWorker ()Lnet/minecraft/class_6830;
CLASS class_4212 MainThreadExecutor
METHOD <init> (Lnet/minecraft/class_3215;Lnet/minecraft/class_1937;)V
ARG 2 world

View File

@ -27,6 +27,7 @@ CLASS net/minecraft/class_3218 net/minecraft/server/world/ServerWorld
COMMENT all players have left and the world does not contain any forced chunks.
FIELD field_35441 MAX_TICKS I
FIELD field_35565 blockEventQueue Ljava/util/List;
FIELD field_36208 structureLocator Lnet/minecraft/class_6832;
METHOD <init> (Lnet/minecraft/server/MinecraftServer;Ljava/util/concurrent/Executor;Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_5268;Lnet/minecraft/class_5321;Lnet/minecraft/class_2874;Lnet/minecraft/class_3949;Lnet/minecraft/class_2794;ZJLjava/util/List;Z)V
ARG 1 server
ARG 2 workerExecutor

View File

@ -0,0 +1,27 @@
CLASS net/minecraft/class_6834 net/minecraft/structure/StructureGeneratorFactory
METHOD checkForBiomeOnTop (Lnet/minecraft/class_2902$class_2903;)Ljava/util/function/Predicate;
ARG 0 heightmapType
METHOD createGenerator (Lnet/minecraft/class_6834$class_6835;)Ljava/util/Optional;
ARG 1 context
METHOD method_39844 (Lnet/minecraft/class_2902$class_2903;Lnet/minecraft/class_6834$class_6835;)Z
ARG 1 context
METHOD method_39845 (Ljava/util/function/Predicate;Ljava/util/Optional;Lnet/minecraft/class_6834$class_6835;)Ljava/util/Optional;
ARG 2 context
METHOD simple (Ljava/util/function/Predicate;Lnet/minecraft/class_6622;)Lnet/minecraft/class_6834;
ARG 0 predicate
ARG 1 generator
CLASS class_6835 Context
FIELD comp_311 world Lnet/minecraft/class_5539;
FIELD comp_314 registryManager Lnet/minecraft/class_5455;
METHOD comp_311 world ()Lnet/minecraft/class_5539;
METHOD comp_314 registryManager ()Lnet/minecraft/class_5455;
METHOD method_39846 getMinCornerHeight (II)I
ARG 1 width
ARG 2 height
METHOD method_39847 getCornerHeights (IIII)[I
ARG 1 x
ARG 2 width
ARG 3 z
ARG 4 height
METHOD method_39848 isBiomeValid (Lnet/minecraft/class_2902$class_2903;)Z
ARG 1 heightmapType

View File

@ -0,0 +1,76 @@
CLASS net/minecraft/class_6832 net/minecraft/world/StructureLocator
FIELD field_36225 LOGGER Lorg/apache/logging/log4j/Logger;
FIELD field_36226 START_NOT_PRESENT_REFERENCE I
FIELD field_36227 chunkIoWorker Lnet/minecraft/class_6830;
FIELD field_36228 registryManager Lnet/minecraft/class_5455;
FIELD field_36229 biomeRegistry Lnet/minecraft/class_2378;
FIELD field_36230 structureManager Lnet/minecraft/class_3485;
FIELD field_36231 worldKey Lnet/minecraft/class_5321;
FIELD field_36232 chunkGenerator Lnet/minecraft/class_2794;
FIELD field_36233 world Lnet/minecraft/class_5539;
FIELD field_36234 biomeSource Lnet/minecraft/class_1966;
FIELD field_36235 seed J
FIELD field_36236 dataFixer Lcom/mojang/datafixers/DataFixer;
FIELD field_36237 cachedFeaturesByChunkPos Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
FIELD field_36238 generationPossibilityByFeature Ljava/util/Map;
METHOD <init> (Lnet/minecraft/class_6830;Lnet/minecraft/class_5455;Lnet/minecraft/class_3485;Lnet/minecraft/class_5321;Lnet/minecraft/class_2794;Lnet/minecraft/class_5539;Lnet/minecraft/class_1966;JLcom/mojang/datafixers/DataFixer;)V
ARG 1 chunkIoWorker
ARG 2 registryManager
ARG 3 structureManager
ARG 4 worldKey
ARG 5 chunkGenerator
ARG 6 world
ARG 7 biomeSource
ARG 8 seed
ARG 10 dataFixer
METHOD method_39827 (JLit/unimi/dsi/fastutil/longs/Long2BooleanMap;)V
ARG 2 generationPossibilityByChunkPos
METHOD method_39828 cache (JLit/unimi/dsi/fastutil/objects/Object2IntMap;)V
ARG 1 pos
ARG 3 referencesByStructure
METHOD method_39829 isGenerationPossible (Lnet/minecraft/class_1923;Lnet/minecraft/class_5312;Ljava/util/Collection;)Z
COMMENT {@return whether {@code feature} is able to generate in {@code pos}}
COMMENT
COMMENT <p>This method only performs simple checks like biomes.
ARG 1 pos
ARG 2 feature
ARG 3 allowedBiomes
COMMENT the list of biomes where the {@code feature} can generate
METHOD method_39830 incrementReferences (Lnet/minecraft/class_1923;Lnet/minecraft/class_3195;)V
ARG 1 pos
ARG 2 feature
METHOD method_39831 getStructurePresence (Lnet/minecraft/class_1923;Lnet/minecraft/class_3195;Z)Lnet/minecraft/class_6833;
ARG 1 pos
ARG 2 feature
ARG 3 skipExistingChunk
METHOD method_39832 getStructurePresence (Lnet/minecraft/class_1923;Lnet/minecraft/class_3195;ZJ)Lnet/minecraft/class_6833;
ARG 1 pos
ARG 2 feature
ARG 3 skipExistingChunk
ARG 4 posLong
METHOD method_39833 cache (Lnet/minecraft/class_1923;Ljava/util/Map;)V
ARG 1 pos
ARG 2 structureStarts
METHOD method_39834 (Lnet/minecraft/class_3195;)Lit/unimi/dsi/fastutil/longs/Long2BooleanMap;
ARG 0 feature
METHOD method_39835 (Lnet/minecraft/class_3195;Lnet/minecraft/class_1923;J)Z
ARG 3 pos
METHOD method_39836 (Lnet/minecraft/class_3195;Ljava/lang/Integer;)Ljava/lang/Integer;
ARG 0 feature
ARG 1 references
METHOD method_39837 (Lnet/minecraft/class_3195;Ljava/lang/Long;Lit/unimi/dsi/fastutil/objects/Object2IntMap;)Lit/unimi/dsi/fastutil/objects/Object2IntMap;
ARG 1 pos
ARG 2 referencesByStructure
METHOD method_39838 createMapIfEmpty (Lit/unimi/dsi/fastutil/objects/Object2IntMap;)Lit/unimi/dsi/fastutil/objects/Object2IntMap;
ARG 0 map
METHOD method_39839 (Lit/unimi/dsi/fastutil/objects/Object2IntMap;Lnet/minecraft/class_3195;Lnet/minecraft/class_3449;)V
ARG 0 feature
ARG 1 start
METHOD method_39840 getStructurePresence (Lit/unimi/dsi/fastutil/objects/Object2IntMap;Lnet/minecraft/class_3195;Z)Lnet/minecraft/class_6833;
ARG 1 referencesByStructure
ARG 2 feature
ARG 3 skipExistingChunk
METHOD method_39841 (Ljava/util/Collection;Lnet/minecraft/class_1959;)Z
ARG 2 biome
METHOD method_39842 collectStructuresAndReferences (Lnet/minecraft/class_2487;)Lit/unimi/dsi/fastutil/objects/Object2IntMap;
ARG 1 nbt

View File

@ -0,0 +1,12 @@
CLASS net/minecraft/class_6833 net/minecraft/world/StructurePresence
COMMENT An enum holding the presence of a certain structure start in a chunk.
COMMENT
COMMENT @see StructureLocator
FIELD field_36239 Lnet/minecraft/class_6833;
COMMENT The structure start is present in the chunk.
FIELD field_36240 Lnet/minecraft/class_6833;
COMMENT The structure start is not present in the chunk, or the
COMMENT start was already referenced and the {@code skipExistingChunk}
COMMENT is set to {@code true}.
FIELD field_36241 Lnet/minecraft/class_6833;
COMMENT The chunk is not loaded.

View File

@ -91,7 +91,7 @@ CLASS net/minecraft/class_3195 net/minecraft/world/gen/feature/StructureFeature
METHOD method_38689 (Lnet/minecraft/class_3037;)Lnet/minecraft/class_5312;
ARG 1 config
METHOD method_38690 getPostProcessor ()Lnet/minecraft/class_6621;
METHOD method_39821 (Lnet/minecraft/class_5455;Lnet/minecraft/class_2794;Lnet/minecraft/class_1966;Lnet/minecraft/class_3485;JLnet/minecraft/class_1923;Lnet/minecraft/class_3037;Lnet/minecraft/class_5539;Ljava/util/function/Predicate;)Z
METHOD method_39821 canGenerate (Lnet/minecraft/class_5455;Lnet/minecraft/class_2794;Lnet/minecraft/class_1966;Lnet/minecraft/class_3485;JLnet/minecraft/class_1923;Lnet/minecraft/class_3037;Lnet/minecraft/class_5539;Ljava/util/function/Predicate;)Z
ARG 1 registryManager
ARG 2 chunkGenerator
ARG 3 biomeSource
@ -99,5 +99,5 @@ CLASS net/minecraft/class_3195 net/minecraft/world/gen/feature/StructureFeature
ARG 5 worldSeed
ARG 7 pos
ARG 8 config
ARG 9 heightLimitView
ARG 9 world
ARG 10 biomePredicate

View File

@ -0,0 +1,4 @@
CLASS net/minecraft/class_6830 net/minecraft/world/storage/NbtScannable
METHOD method_39795 scanChunk (Lnet/minecraft/class_1923;Lnet/minecraft/class_6836;)Ljava/util/concurrent/CompletableFuture;
ARG 1 pos
ARG 2 scanner

View File

@ -25,3 +25,4 @@ CLASS net/minecraft/class_3977 net/minecraft/world/storage/VersionedChunkStorage
ARG 0 nbt
ARG 1 worldKey
ARG 2 generatorCodecKey
METHOD method_39800 getWorker ()Lnet/minecraft/class_6830;