fix for 1.18.2

This commit is contained in:
Wagyourtail 2022-02-28 15:29:37 -07:00
parent b6cc15e9ab
commit 519a76a171
No known key found for this signature in database
GPG Key ID: B3A2A4A58244B050
3 changed files with 6 additions and 7 deletions

View File

@ -29,8 +29,8 @@ jobs:
- name: Build (fabric) with Gradle
run: ./gradlew build -Pbaritone.fabric_build
- name: Build (forge) with Gradle
run: ./gradlew build -Pbaritone.forge_build -Ploom.platform=forge
# - name: Build (forge) with Gradle
# run: ./gradlew build -Pbaritone.forge_build -Ploom.platform=forge
- name: Archive Artifacts
uses: actions/upload-artifact@v2

View File

@ -1,10 +1,10 @@
org.gradle.jvmargs=-Xmx2048M
mod_version=1.8.2
mod_version=1.8.3
maven_group=baritone
archives_base_name=baritone
minecraft_version=1.18
minecraft_version=1.18.2
forge_version=1.18-38.0.10
fabric_version=0.12.5

View File

@ -29,7 +29,6 @@ import net.minecraft.server.packs.repository.Pack;
import net.minecraft.server.packs.repository.PackRepository;
import net.minecraft.server.packs.repository.ServerPacksSource;
import net.minecraft.server.packs.resources.ReloadableResourceManager;
import net.minecraft.server.packs.resources.SimpleReloadableResourceManager;
import net.minecraft.util.Unit;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
@ -147,11 +146,11 @@ public final class BlockOptionalMeta {
PackRepository rpl = new PackRepository(PackType.SERVER_DATA, new ServerPacksSource());
rpl.reload();
PackResources thePack = rpl.getAvailablePacks().iterator().next().open();
ReloadableResourceManager resourceManager = new SimpleReloadableResourceManager(PackType.SERVER_DATA);
ReloadableResourceManager resourceManager = new ReloadableResourceManager(PackType.SERVER_DATA);
manager = new LootTables(predicate);
resourceManager.registerReloadListener(manager);
try {
resourceManager.reload(new ThreadPerTaskExecutor(Thread::new), new ThreadPerTaskExecutor(Thread::new), Collections.singletonList(thePack), CompletableFuture.completedFuture(Unit.INSTANCE)).get();
resourceManager.createReload(new ThreadPerTaskExecutor(Thread::new), new ThreadPerTaskExecutor(Thread::new), CompletableFuture.completedFuture(Unit.INSTANCE), Collections.singletonList(thePack)).done().get();
} catch (Exception exception) {
throw new RuntimeException(exception);
}