Streamlined WorldBootstrap
This commit is contained in:
parent
d9a586741e
commit
b4f9fdf95f
13 changed files with 172 additions and 141 deletions
|
@ -1,18 +1,32 @@
|
|||
package org.betterx.bclib.mixin.client;
|
||||
|
||||
import org.betterx.bclib.client.BCLibClient;
|
||||
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@Mixin(ModelManager.class)
|
||||
public class ModelManagerMixin {
|
||||
//TODO: 1.19.3 Disabled for now
|
||||
// @Inject(method = "prepare", at = @At("HEAD"))
|
||||
// private void bclib_loadCustomModels(
|
||||
// ResourceManager resourceManager,
|
||||
// ProfilerFiller profilerFiller,
|
||||
// CallbackInfoReturnable<ModelBakery> info
|
||||
// ) {
|
||||
// BCLibClient.modelBakery.loadCustomModels(resourceManager);
|
||||
// }
|
||||
@Inject(method = "reload", at = @At(value = "INVOKE", shift = At.Shift.AFTER, target = "Lnet/minecraft/util/profiling/ProfilerFiller;startTick()V"))
|
||||
private void bclib_loadCustomModels(
|
||||
PreparableReloadListener.PreparationBarrier preparationBarrier,
|
||||
ResourceManager resourceManager,
|
||||
ProfilerFiller profilerFiller,
|
||||
ProfilerFiller profilerFiller2,
|
||||
Executor executor,
|
||||
Executor executor2,
|
||||
CallbackInfoReturnable<CompletableFuture<Void>> cir
|
||||
) {
|
||||
BCLibClient.modelBakery.loadCustomModels(resourceManager);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue