mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 00:07:45 +00:00
Fix lost validation of registry data on singleplayer world load (#8533)
Fix some leftover 1.18.2 TODOs
This commit is contained in:
1 parent
c7e4e60052
commit
e5d4e5d3ab
7 files changed
+17
-42
No files matched your search
@@ -326,17 +326,11 @@
|
||||
LevelStorageSource.LevelStorageAccess levelstoragesource$levelstorageaccess;
|
||||
try {
|
||||
levelstoragesource$levelstorageaccess = this.f_91031_.m_78260_(p_205206_);
|
||||
@@ -1849,11 +_,18 @@
|
||||
@@ -1849,11 +_,12 @@
|
||||
|
||||
WorldStem worldstem;
|
||||
try {
|
||||
+
|
||||
+ //TODO-PATCHING: World loading has changed massively. Figure out what calls need to be delayed.
|
||||
+ /*if (!creating) levelstoragesource$levelstorageaccess.readAdditionalLevelSaveData();
|
||||
+ registryHolder = creating ? p_91221_ : RegistryAccess.m_123086_();
|
||||
+ minecraft$serverstem = this.m_91190_(registryHolder, p_91222_, p_91223_, p_91224_, levelstoragesource$levelstorageaccess);
|
||||
+*/
|
||||
+
|
||||
+ if (!creating) levelstoragesource$levelstorageaccess.readAdditionalLevelSaveData();
|
||||
worldstem = this.m_205125_(packrepository, p_205209_, p_205207_.apply(levelstoragesource$levelstorageaccess), p_205208_.apply(levelstoragesource$levelstorageaccess));
|
||||
} catch (Exception exception) {
|
||||
f_90982_.warn("Failed to load datapacks, can't proceed with server load", (Throwable)exception);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
try {
|
||||
String s = f_126542_.toJson((JsonElement)jsonobject);
|
||||
@@ -88,6 +_,18 @@
|
||||
@@ -88,6 +_,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,9 +49,8 @@
|
||||
+ // We only care about non-optional tag entries, this is the only type that can reference a resource and needs validation
|
||||
+ // Optional tags should not be validated
|
||||
+
|
||||
+ //TODO-PATCHING:Figure out optional tag data.
|
||||
+ if (entry instanceof Tag.TagEntry) {
|
||||
+ return existingFileHelper == null || !existingFileHelper.exists(((Tag.TagEntry)entry).getId(), resourceType);
|
||||
+ if (entry instanceof Tag.TagEntry nonOptionalEntry) {
|
||||
+ return existingFileHelper == null || !existingFileHelper.exists(nonOptionalEntry.getId(), resourceType);
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
@@ -30,12 +30,11 @@
|
||||
|
||||
CrashReport.m_127529_();
|
||||
if (optionset.has(optionspec13)) {
|
||||
@@ -93,29 +_,29 @@
|
||||
@@ -93,29 +_,28 @@
|
||||
Bootstrap.m_135870_();
|
||||
Bootstrap.m_135889_();
|
||||
Util.m_137584_();
|
||||
+ if (!optionset.has(optionspec1)) net.minecraftforge.server.loading.ServerModLoader.load(); // Load mods before we load almost anything else anymore. Single spot now. Only loads if they haven't passed the initserver param
|
||||
+ //TODO-PATCHING: Figure out how to handle the delayed initialization.
|
||||
Path path = Paths.get("server.properties");
|
||||
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(path);
|
||||
dedicatedserversettings.m_139780_();
|
||||
@@ -67,7 +66,7 @@
|
||||
LevelSummary levelsummary = levelstoragesource$levelstorageaccess.m_78308_();
|
||||
if (levelsummary != null) {
|
||||
if (levelsummary.m_193020_()) {
|
||||
@@ -181,22 +_,34 @@
|
||||
@@ -181,22 +_,33 @@
|
||||
}
|
||||
|
||||
levelstoragesource$levelstorageaccess.m_78287_(registryaccess$frozen, worlddata);
|
||||
@@ -101,8 +100,7 @@
|
||||
+ // FORGE: Halting as GameTestServer will cause issues as it always calls System#exit on both crash and normal exit, so skip it
|
||||
+ if (!(dedicatedserver instanceof net.minecraft.gametest.framework.GameTestServer))
|
||||
dedicatedserver.m_7570_(true);
|
||||
+ //TODO-PATCHING: Figure out what needs to be done here after the logging update.
|
||||
+ //LogManager.shutdown(); // we're manually managing the logging shutdown on the server. Make sure we do it here at the end.
|
||||
+ org.apache.logging.log4j.LogManager.shutdown(); // we're manually managing the logging shutdown on the server. Make sure we do it here at the end.
|
||||
}
|
||||
};
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(f_129670_));
|
||||
@@ -155,14 +155,6 @@
|
||||
}
|
||||
|
||||
public SystemReport m_177935_(SystemReport p_177936_) {
|
||||
@@ -982,6 +_,7 @@
|
||||
p_177936_.m_143522_("Data Packs", () -> {
|
||||
StringBuilder stringbuilder = new StringBuilder();
|
||||
|
||||
+ //TODO-PATCHING:Figure out how to stop the logger here.
|
||||
for(Pack pack : this.f_129730_.m_10524_()) {
|
||||
if (stringbuilder.length() > 0) {
|
||||
stringbuilder.append(", ");
|
||||
@@ -1316,6 +_,7 @@
|
||||
this.m_6846_().m_11315_();
|
||||
this.f_129734_.m_136120_(this.f_129740_.f_206585_.m_206860_());
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
+ this(p_41364_, new ResourceLocation("textures/entity/horse/armor/horse_armor_" + p_41365_ + ".png"), p_41366_);
|
||||
+ }
|
||||
+
|
||||
+ public HorseArmorItem(int p_41364_, ResourceLocation p_41111_, Item.Properties p_41366_) {
|
||||
+ public HorseArmorItem(int p_41364_, ResourceLocation p_41365_, Item.Properties p_41366_) {
|
||||
super(p_41366_);
|
||||
this.f_41361_ = p_41364_;
|
||||
- this.f_41362_ = "textures/entity/horse/armor/horse_armor_" + p_41365_ + ".png";
|
||||
+ this.f_41362_ = p_41111_;
|
||||
+ this.f_41362_ = p_41365_;
|
||||
}
|
||||
|
||||
public ResourceLocation m_41367_() {
|
||||
|
||||
@@ -94,13 +94,6 @@ public interface IForgeFluid
|
||||
return this.getFluid().getRenderLayer() == layer;
|
||||
}*/
|
||||
|
||||
// /**
|
||||
// * Retrieves a list of tags names this is known to be associated with.
|
||||
// * This should be used in favor of TagCollection.getOwningTags, as this caches the result and automatically updates when the TagCollection changes.
|
||||
// */
|
||||
// Set<ResourceLocation> getTags();
|
||||
// TODO-PATCHING: Tag locations are now TagKeys
|
||||
|
||||
/**
|
||||
* Retrieves the non-vanilla fluid attributes, including localized name.
|
||||
*/
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
net/minecraft/client/Minecraft.doLoadLevel(Ljava/lang/String;Ljava/util/function/Function;Ljava/util/function/Function;ZLnet/minecraft/client/Minecraft$ExperimentalDialogType;Z)V=|p_205206_,p_205207_,p_205208_,p_205209_,p_205210_,creating
|
||||
net/minecraft/client/gui/screens/MenuScreens.getScreenFactory(Lnet/minecraft/world/inventory/MenuType;Lnet/minecraft/client/Minecraft;ILnet/minecraft/network/chat/Component;)Ljava/util/Optional;=|p_96202_,p_96203_,p_96204_,p_96205_
|
||||
net/minecraft/client/gui/screens/Screen.renderToolTip(Lcom/mojang/blaze3d/vertex/PoseStack;Ljava/util/List;IILnet/minecraft/client/gui/Font;)V=|p_96618_,p_96619_,p_96620_,p_96621_,font
|
||||
net/minecraft/client/renderer/FogRenderer.setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V=|p_109025_,p_109026_,p_109027_,p_109028_,partialTicks
|
||||
net/minecraft/client/renderer/ScreenEffectRenderer.getOverlayBlock(Lnet/minecraft/world/entity/player/Player;)Lorg/apache/commons/lang3/tuple/Pair;=|p_110717_
|
||||
net/minecraft/client/renderer/ShaderInstance.<init>(Lnet/minecraft/server/packs/resources/ResourceProvider;Lnet/minecraft/resources/ResourceLocation;Lcom/mojang/blaze3d/vertex/VertexFormat;)V=|p_173336_,shaderLocation,p_173338_
|
||||
net/minecraft/client/renderer/block/BlockModelShaper.getTexture(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/client/renderer/texture/TextureAtlasSprite;=|p_110883_,level,pos
|
||||
net/minecraft/client/renderer/block/model/BlockModel.bakeVanilla(Lnet/minecraft/client/resources/model/ModelBakery;Lnet/minecraft/client/renderer/block/model/BlockModel;Ljava/util/function/Function;Lnet/minecraft/client/resources/model/ModelState;Lnet/minecraft/resources/ResourceLocation;Z)Lnet/minecraft/client/resources/model/BakedModel;=|p_111450_,p_111451_,p_111452_,p_111453_,p_111454_,p_111455_
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$ChunkCompileTask.<init>(Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk;Lnet/minecraft/world/level/ChunkPos;D)V=|p_112851_,pos,p_112852_
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$RebuildTask.<init>(Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk;Lnet/minecraft/world/level/ChunkPos;DLnet/minecraft/client/renderer/chunk/RenderChunkRegion;)V=|p_112861_,pos,p_112862_,p_112863_
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$ChunkCompileTask.<init>(Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk;Lnet/minecraft/world/level/ChunkPos;DZ)V=|p_194422_,pos,p_194423_,p_194424_
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$RebuildTask.<init>(Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk;Lnet/minecraft/world/level/ChunkPos;DLnet/minecraft/client/renderer/chunk/RenderChunkRegion;Z)V=|p_194426_,pos,p_194427_,p_194428_,p_194429_
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$ResortTransparencyTask.<init>(Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk;Lnet/minecraft/world/level/ChunkPos;DLnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$CompiledChunk;)V=|p_112888_,pos,p_112889_,p_112890_
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.<init>(Lnet/minecraft/world/level/Level;Lnet/minecraft/client/renderer/LevelRenderer;Ljava/util/concurrent/Executor;ZLnet/minecraft/client/renderer/ChunkBufferBuilderPack;I)V=|p_112686_,p_112687_,p_112688_,p_112689_,p_112690_,countRenderBuilders
|
||||
net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.<init>(Lnet/minecraft/client/multiplayer/ClientLevel;Lnet/minecraft/client/renderer/LevelRenderer;Ljava/util/concurrent/Executor;ZLnet/minecraft/client/renderer/ChunkBufferBuilderPack;I)V=|p_194405_,p_194406_,p_194407_,p_194408_,p_194409_,countRenderBuilders
|
||||
net/minecraft/client/resources/model/ModelBakery.<init>(Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/client/color/block/BlockColors;Z)V=|p_119247_,p_119248_,vanillaBakery
|
||||
net/minecraft/client/resources/model/ModelBakery.processLoading(Lnet/minecraft/util/profiling/ProfilerFiller;I)V=|p_119249_,p_119250_
|
||||
net/minecraft/client/resources/model/MultiPartBakedModel.getQuads(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/Direction;Ljava/util/Random;Lnet/minecraftforge/client/model/data/IModelData;)Ljava/util/List;=|p_119465_,p_119466_,p_119467_,modelData
|
||||
@@ -21,7 +21,7 @@ net/minecraft/data/tags/FluidTagsProvider.<init>(Lnet/minecraft/data/DataGenerat
|
||||
net/minecraft/data/tags/GameEventTagsProvider.<init>(Lnet/minecraft/data/DataGenerator;Ljava/lang/String;Lnet/minecraftforge/common/data/ExistingFileHelper;)V=|p_176826_,modId,existingFileHelper
|
||||
net/minecraft/data/tags/ItemTagsProvider.<init>(Lnet/minecraft/data/DataGenerator;Lnet/minecraft/data/tags/BlockTagsProvider;Ljava/lang/String;Lnet/minecraftforge/common/data/ExistingFileHelper;)V=|p_126530_,p_126531_,modId,existingFileHelper
|
||||
net/minecraft/data/tags/TagsProvider.<init>(Lnet/minecraft/data/DataGenerator;Lnet/minecraft/core/Registry;Ljava/lang/String;Lnet/minecraftforge/common/data/ExistingFileHelper;)V=|p_126546_,p_126547_,modId,existingFileHelper
|
||||
net/minecraft/gametest/framework/GameTestRegistry.register(Ljava/lang/reflect/Method;)V=|p_177504_,allowedNamespaces
|
||||
net/minecraft/gametest/framework/GameTestRegistry.register(Ljava/lang/reflect/Method;Ljava/util/Set;)V=|p_177504_,allowedNamespaces
|
||||
net/minecraft/network/FriendlyByteBuf.writeItemStack(Lnet/minecraft/world/item/ItemStack;Z)Lnet/minecraft/network/FriendlyByteBuf;=|p_130056_,limitedTag
|
||||
net/minecraft/server/dedicated/DedicatedServer.sendMessage(Lnet/minecraft/network/chat/Component;Ljava/util/UUID;)V=|message,p_108776_
|
||||
net/minecraft/server/level/ServerLevel.removeEntity(Lnet/minecraft/world/entity/Entity;Z)V=|p_8868_,keepData
|
||||
@@ -39,7 +39,7 @@ net/minecraft/world/entity/player/Player.getDigSpeed(Lnet/minecraft/world/level/
|
||||
net/minecraft/world/entity/projectile/ThrownEnderpearl.changeDimension(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraftforge/common/util/ITeleporter;)Lnet/minecraft/world/entity/Entity;=|p_37506_,teleporter
|
||||
net/minecraft/world/item/BoneMealItem.applyBonemeal(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/entity/player/Player;)Z=|p_40628_,p_40629_,p_40630_,player
|
||||
net/minecraft/world/item/DyeableHorseArmorItem.<init>(ILnet/minecraft/resources/ResourceLocation;Lnet/minecraft/world/item/Item$Properties;)V=|p_41110_,p_41111_,p_41112_
|
||||
net/minecraft/world/item/HorseArmorItem.<init>(ILnet/minecraft/resources/ResourceLocation;Lnet/minecraft/world/item/Item$Properties;)V=|p_41364_,p_41111_,p_41366_
|
||||
net/minecraft/world/item/HorseArmorItem.<init>(ILnet/minecraft/resources/ResourceLocation;Lnet/minecraft/world/item/Item$Properties;)V=|p_41364_,p_41365_,p_41366_
|
||||
net/minecraft/world/item/ItemStack.<init>(Lnet/minecraft/world/level/ItemLike;ILnet/minecraft/nbt/CompoundTag;)V=|p_41604_,p_41605_,p_41606_
|
||||
net/minecraft/world/item/ItemStack.onItemUse(Lnet/minecraft/world/item/context/UseOnContext;Ljava/util/function/Function;)Lnet/minecraft/world/InteractionResult;=|p_41662_,callback
|
||||
net/minecraft/world/item/ItemStack.onItemUseFirst(Lnet/minecraft/world/item/context/UseOnContext;)Lnet/minecraft/world/InteractionResult;=|p_41662_
|
||||
@@ -50,8 +50,7 @@ net/minecraft/world/level/LevelSettings.<init>(Ljava/lang/String;Lnet/minecraft/
|
||||
net/minecraft/world/level/block/FireBlock.tryCatchFire(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;ILjava/util/Random;ILnet/minecraft/core/Direction;)V=|p_53432_,p_53433_,p_53434_,p_53435_,p_53436_,face
|
||||
net/minecraft/world/level/block/FlowerPotBlock.<init>(Ljava/util/function/Supplier;Ljava/util/function/Supplier;Lnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V=|emptyPot,p_53528_,properties
|
||||
net/minecraft/world/level/block/LiquidBlock.<init>(Ljava/util/function/Supplier;Lnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V=|p_54694_,p_54695_
|
||||
net/minecraft/world/level/chunk/PalettedContainer.setBits(IZ)V=|p_63122_,forceBits
|
||||
net/minecraft/world/level/dimension/LevelStem.<init>(Ljava/util/function/Supplier;Lnet/minecraft/world/level/dimension/LevelStem;Z)V=|p_63979_,p_63980_,useServerSeed
|
||||
net/minecraft/world/level/dimension/LevelStem.<init>(Lnet/minecraft/core/Holder;Lnet/minecraft/world/level/chunk/ChunkGenerator;Z)V=|p_204519_,p_204520_,useServerSeed
|
||||
net/minecraft/world/level/entity/PersistentEntitySectionManager.addEntityWithoutEvent(Lnet/minecraft/world/level/entity/EntityAccess;Z)Z=|p_157539_,p_157540_
|
||||
net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.processEntityInfos(Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings;Ljava/util/List;)Ljava/util/List;=|template,p_215387_0_,p_215387_1_,p_215387_2_,p_215387_3_
|
||||
net/minecraft/world/level/storage/loot/LootPool.<init>([Lnet/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer;[Lnet/minecraft/world/level/storage/loot/predicates/LootItemCondition;[Lnet/minecraft/world/level/storage/loot/functions/LootItemFunction;Lnet/minecraft/world/level/storage/loot/providers/number/NumberProvider;Lnet/minecraft/world/level/storage/loot/providers/number/NumberProvider;Ljava/lang/String;)V=|p_165128_,p_165129_,p_165130_,p_165131_,p_165132_,name
|
||||
Reference in new issue
Block a user