TagLoader fix
This commit is contained in:
parent
a283ca1951
commit
01391537fe
1 changed files with 2 additions and 2 deletions
|
@ -19,14 +19,14 @@ import ru.betterend.util.TagHelper;
|
|||
@Mixin(TagLoader.class)
|
||||
public class TagLoaderMixin {
|
||||
@Shadow
|
||||
private String directory;
|
||||
private String name;
|
||||
|
||||
@Inject(method = "prepare", at = @At("RETURN"), cancellable = true)
|
||||
public void be_prepareReload(ResourceManager manager, Executor executor, CallbackInfoReturnable<CompletableFuture<Map<ResourceLocation, Tag.Builder>>> info) {
|
||||
CompletableFuture<Map<ResourceLocation, Tag.Builder>> future = info.getReturnValue();
|
||||
info.setReturnValue(CompletableFuture.supplyAsync(() -> {
|
||||
Map<ResourceLocation, Tag.Builder> map = Maps.newHashMap(future.join());
|
||||
TagHelper.apply(directory, map);
|
||||
TagHelper.apply(name, map);
|
||||
return map;
|
||||
}, executor));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue