/* * This file is part of Applied Energistics 2. * Copyright (c) 2013 - 2017, AlgorithmX2, All rights reserved. * * Applied Energistics 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Applied Energistics 2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Applied Energistics 2. If not, see . */ package appeng.client.render; import java.util.List; import java.util.Random; import javax.annotation.Nullable; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.json.ModelTransformation; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.block.BlockState; import net.minecraft.client.render.model.BakedQuad; import net.minecraft.client.render.model.json.ModelOverrideList; import net.minecraft.client.texture.Sprite; import net.minecraft.util.math.Direction; public abstract class DelegateBakedModel implements BakedModel { private final BakedModel baseModel; protected DelegateBakedModel(BakedModel base) { this.baseModel = base; } @Override @Deprecated public List getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand) { return baseModel.getQuads(state, side, rand); } @Override public boolean isSideLit() { return baseModel.isSideLit(); } @Override public ModelOverrideList getOverrides() { return baseModel.getOverrides(); } @Override public BakedModel handlePerspective(ModelTransformation.Mode cameraTransformType, MatrixStack mat) { baseModel.handlePerspective(cameraTransformType, mat); return this; } @Override public Sprite getSprite() { return this.baseModel.getSprite(); } @Override public ModelTransformation getTransformation() { return this.baseModel.getTransformation(); } @Override public boolean useAmbientOcclusion() { return this.baseModel.useAmbientOcclusion(); } @Override public boolean hasDepth() { return this.baseModel.hasDepth(); } @Override public boolean isBuiltin() { return this.baseModel.isBuiltin(); } public BakedModel getBaseModel() { return this.baseModel; } }