Merge remote-tracking branch 'origin/main' into 1.18
This commit is contained in:
commit
dc8c9832d2
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.embeddedt.modernfix.fabric.mixin.perf.dynamic_resources;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.impl.client.model.ModelLoadingRegistryImpl;
|
||||||
|
import net.minecraft.client.resources.model.ModelBakery;
|
||||||
|
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||||
|
import org.embeddedt.modernfix.annotation.RequiresMod;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
|
@Mixin(ModelLoadingRegistryImpl.LoaderInstance.class)
|
||||||
|
@RequiresMod("fabric-models-v0")
|
||||||
|
@ClientOnlyMixin
|
||||||
|
public class LoaderInstanceMixin {
|
||||||
|
@Redirect(method = "finish", at = @At(value = "FIELD", target = "Lnet/fabricmc/fabric/impl/client/model/ModelLoadingRegistryImpl$LoaderInstance;loader:Lnet/minecraft/client/resources/model/ModelBakery;"))
|
||||||
|
private void keepLoader(ModelLoadingRegistryImpl.LoaderInstance instance, ModelBakery value) {
|
||||||
|
/* allow loading models to happen later */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -243,9 +243,12 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
||||||
"block",
|
"block",
|
||||||
"blocks",
|
"blocks",
|
||||||
"cape",
|
"cape",
|
||||||
|
"entity/bed",
|
||||||
|
"entity/chest",
|
||||||
"item",
|
"item",
|
||||||
"items",
|
"items",
|
||||||
"pipe"
|
"pipe",
|
||||||
|
"ropebridge"
|
||||||
};
|
};
|
||||||
for(String folder : extraFolders) {
|
for(String folder : extraFolders) {
|
||||||
Collection<ResourceLocation> textureLocations = this.resourceManager.listResources("textures/" + folder, p -> p.endsWith(".png"));
|
Collection<ResourceLocation> textureLocations = this.resourceManager.listResources("textures/" + folder, p -> p.endsWith(".png"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user