Ported model dependency changes from Fabric 1.16.
Made IChestLid sided.
This commit is contained in:
@@ -19,21 +19,17 @@
|
||||
package appeng.client.render;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.model.RenderMaterial;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
import appeng.client.render.cablebus.FacadeBuilder;
|
||||
import appeng.core.AppEng;
|
||||
@@ -42,7 +38,7 @@ import appeng.core.AppEng;
|
||||
* The model class for facades. Since facades wrap existing models, they don't
|
||||
* declare any dependencies here other than the cable anchor.
|
||||
*/
|
||||
public class FacadeItemModel implements IModelGeometry<FacadeItemModel> {
|
||||
public class FacadeItemModel implements BasicUnbakedModel<FacadeItemModel> {
|
||||
|
||||
// We use this to get the default item transforms and make our lives easier
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation(AppEng.MOD_ID, "item/facade_base");
|
||||
@@ -58,9 +54,7 @@ public class FacadeItemModel implements IModelGeometry<FacadeItemModel> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<RenderMaterial> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return modelGetter.apply(MODEL_BASE).getTextures(modelGetter, missingTextureErrors);
|
||||
public Collection<ResourceLocation> getModelDependencies() {
|
||||
return Collections.singleton(MODEL_BASE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user