Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -36,17 +36,17 @@ public abstract class AbstractTestingBase {
public static final TagRegistry TAG_REGISTRY;
static {
SharedConstants.a();
DispenserRegistry.init();
SharedConstants.tryDetectVersion();
DispenserRegistry.bootStrap();
// Set up resource manager
ResourceManager resourceManager = new ResourceManager(EnumResourcePackType.SERVER_DATA);
// add tags and loot tables for unit tests
resourceManager.a(TAG_REGISTRY = new TagRegistry(IRegistryCustom.a()));
resourceManager.a(LOOT_TABLE_REGISTRY = new LootTableRegistry(new LootPredicateManager()));
resourceManager.registerReloadListener(TAG_REGISTRY = new TagRegistry(IRegistryCustom.builtin()));
resourceManager.registerReloadListener(LOOT_TABLE_REGISTRY = new LootTableRegistry(new LootPredicateManager()));
// Register vanilla pack
resourceManager.a(MoreExecutors.directExecutor(), MoreExecutors.directExecutor(), Collections.singletonList(new ResourcePackVanilla(ResourcePackSourceVanilla.BUILT_IN_METADATA, "minecraft")), CompletableFuture.completedFuture(Unit.INSTANCE)).join();
resourceManager.reload(MoreExecutors.directExecutor(), MoreExecutors.directExecutor(), Collections.singletonList(new ResourcePackVanilla(ResourcePackSourceVanilla.BUILT_IN_METADATA, "minecraft")), CompletableFuture.completedFuture(Unit.INSTANCE)).join();
// Bind tags
TAG_REGISTRY.a().bind();
TAG_REGISTRY.getTags().bindToGlobal();
DummyServer.setup();
DummyEnchantments.setup();

View File

@@ -93,7 +93,7 @@ public final class DummyServer implements InvocationHandler {
@Override
public Object handle(DummyServer server, Object[] args) {
NamespacedKey key = (NamespacedKey) args[0];
return new CraftLootTable(key, AbstractTestingBase.LOOT_TABLE_REGISTRY.getLootTable(CraftNamespacedKey.toMinecraft(key)));
return new CraftLootTable(key, AbstractTestingBase.LOOT_TABLE_REGISTRY.get(CraftNamespacedKey.toMinecraft(key)));
}
}
);