Fixed missing textures
This commit is contained in:
parent
29b8e96bbe
commit
2bb3c81839
2 changed files with 10 additions and 4 deletions
|
@ -10,12 +10,15 @@ import org.betterx.bclib.registry.PresetsRegistryClient;
|
|||
import org.betterx.worlds.together.WorldsTogether;
|
||||
import org.betterx.worlds.together.client.WorldsTogetherClient;
|
||||
|
||||
import net.minecraft.client.renderer.texture.SpriteLoader;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlas;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.model.*;
|
||||
import net.fabricmc.fabric.api.event.client.ClientSpriteRegistryCallback;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -36,6 +39,13 @@ public class BCLibClient implements ClientModInitializer, ModelResourceProvider,
|
|||
PresetsRegistryClient.onLoad();
|
||||
WorldsTogether.SURPRESS_EXPERIMENTAL_DIALOG = Configs.CLIENT_CONFIG.suppressExperimentalDialog();
|
||||
//dumpDatapack();
|
||||
|
||||
ClientSpriteRegistryCallback
|
||||
.event(TextureAtlas.LOCATION_BLOCKS)
|
||||
.register((resourceManager, sprites) -> {
|
||||
SpriteLoader.listSprites(resourceManager, "entity/chest", sprites::put);
|
||||
SpriteLoader.listSprites(resourceManager, "blocks", sprites::put);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,10 +28,6 @@ public class CustomModelBakery {
|
|||
}
|
||||
|
||||
public UnbakedModel getItemModel(ResourceLocation location) {
|
||||
ResourceLocation storageID = new ResourceLocation(
|
||||
location.getNamespace(),
|
||||
"models/item/" + location.getPath() + ".json"
|
||||
);
|
||||
return models.get(location);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue