This commit is contained in:
Vincent Lee committed 2016-03-12 00:59:11 -06:00
1 parent 949fdde057
commit 64e1282444
1 file changed
+8 -8
@@ -13,27 +13,27 @@ import net.minecraft.util.EnumFacing;
import net.minecraftforge.client.model.Attributes;
import net.minecraftforge.client.model.IFlexibleBakedModel;
import net.minecraftforge.client.model.IPerspectiveAwareModel;
import net.minecraftforge.client.model.TRSRTransformation;
import org.apache.commons.lang3.tuple.Pair;
import vazkii.botania.common.core.handler.ConfigHandler;
import javax.vecmath.Matrix4f;
import java.util.List;
@SuppressWarnings("deprecation")
public class LexiconModel implements IPerspectiveAwareModel {
private static final ModelResourceLocation path = new ModelResourceLocation("botania:lexicon_default", "inventory");
@Override
public Pair<? extends IFlexibleBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) {
ModelResourceLocation path = new ModelResourceLocation("botania:lexicon_default", "inventory");
IBakedModel original = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager().getModel(path);
if(cameraTransformType == ItemCameraTransforms.TransformType.FIRST_PERSON && ConfigHandler.lexicon3dModel) {
if(cameraTransformType == ItemCameraTransforms.TransformType.FIRST_PERSON && ConfigHandler.lexicon3dModel)
return Pair.of(this, null);
}
return Pair.of(new IFlexibleBakedModel.Wrapper(original, Attributes.DEFAULT_BAKED_FORMAT), new TRSRTransformation(original.getItemCameraTransforms().getTransform(cameraTransformType)).getMatrix());
return ((IPerspectiveAwareModel) original).handlePerspective(cameraTransformType);
}
@Override public VertexFormat getFormat() { return DefaultVertexFormats.ITEM; }
@Override public List<BakedQuad> getFaceQuads(EnumFacing p_177551_1_) { return ImmutableList.of(); }
@Override public VertexFormat getFormat() { return Attributes.DEFAULT_BAKED_FORMAT; }
@Override public List<BakedQuad> getFaceQuads(EnumFacing face) { return ImmutableList.of(); }
@Override public List<BakedQuad> getGeneralQuads() { return ImmutableList.of(); }
@Override public boolean isAmbientOcclusion() { return false; }
@Override public boolean isGui3d() { return false; }