Java 类net.minecraftforge.client.model.PerspectiveMapWrapper 实例源码

项目:OpenModsLib    文件:VariantModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    final Map<ResourceLocation, IBakedModel> bakedSubModels = Maps.newHashMap();

    for (ResourceLocation subModel : modelData.getAllModels()) {
        IModel model = ModelLoaderRegistry.getModelOrLogError(subModel, "Couldn't load sub-model dependency: " + subModel);
        bakedSubModels.put(subModel, model.bake(new ModelStateComposition(state, model.getDefaultState()), format, bakedTextureGetter));
    }

    final IModel baseModel;
    if (base.isPresent()) {
        ResourceLocation baseLocation = base.get();
        baseModel = ModelLoaderRegistry.getModelOrLogError(baseLocation, "Couldn't load base-model dependency: " + baseLocation);
    } else {
        baseModel = ModelLoaderRegistry.getMissingModel();
    }

    final IBakedModel bakedBaseModel = baseModel.bake(new ModelStateComposition(state, baseModel.getDefaultState()), format, bakedTextureGetter);

    return new BakedModel(bakedBaseModel, modelData, bakedSubModels, PerspectiveMapWrapper.getTransforms(state));
}
项目:OpenModsLib    文件:MultiLayerModel.java   
@Override
public IBakedModel bake(final IModelState state, final VertexFormat format, final Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    final Map<BlockRenderLayer, IBakedModel> bakedModels = Maps.transformValues(models, location -> bakeModel(location, state, format, bakedTextureGetter));

    IModel missing = ModelLoaderRegistry.getMissingModel();
    IBakedModel bakedMissing = missing.bake(missing.getDefaultState(), format, bakedTextureGetter);

    final IBakedModel bakedBase;
    if (base.isPresent()) {
        bakedBase = bakeModel(base.get(), state, format, bakedTextureGetter);
    } else {
        bakedBase = bakedMissing;
    }

    return new MultiLayerBakedModel(
            bakedModels,
            bakedBase,
            bakedMissing,
            PerspectiveMapWrapper.getTransforms(state));
}
项目:OpenModsLib    文件:PerspectiveAwareModel.java   
@Override
public IBakedModel bake(final IModelState state, final VertexFormat format, final Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    final Map<TransformType, IBakedModel> bakedModels = Maps.transformValues(models, location -> bakeModel(location, state, format, bakedTextureGetter));

    IModel missing = ModelLoaderRegistry.getMissingModel();
    IBakedModel bakedMissing = missing.bake(missing.getDefaultState(), format, bakedTextureGetter);

    final IBakedModel bakedBase;
    if (base.isPresent()) {
        bakedBase = bakeModel(base.get(), state, format, bakedTextureGetter);
    } else {
        bakedBase = bakedMissing;
    }

    return new PerspectiveAwareBakedModel(
            bakedModels,
            bakedBase,
            PerspectiveMapWrapper.getTransforms(state));
}
项目:Adventurers-Toolbox    文件:MaceModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedMaceModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:DaggerModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (bladeTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (bladeTexture != null) {
            texBuilder.add(bladeTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedDaggerModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:HoeModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedHoeModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:PickaxeModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedPickaxeModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:AxeModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedAxeModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:HammerModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedHammerModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:ShovelModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedShovelModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:ToolHeadModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
    ImmutableList<ResourceLocation> textures = ImmutableList.<ResourceLocation>of(new ResourceLocation(modid, "items/" + toolName + "/" + partName + "_" + matName));
    builder.addAll(new ItemLayerModel(textures).bake(state, format, bakedTextureGetter).getQuads(null, null, 0));
    return new BakedToolHeadModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Adventurers-Toolbox    文件:SwordModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (bladeTexture != null && crossguardTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (bladeTexture != null) {
            texBuilder.add(bladeTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (crossguardTexture != null) {
            texBuilder.add(crossguardTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedSwordModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:Clef    文件:BakedModelInstrument.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType type)
{
    if(instrument != null)
    {
        HashMap<ItemCameraTransforms.TransformType, TRSRTransformation> map = new HashMap<>();
        map.put(ItemCameraTransforms.TransformType.FIRST_PERSON_LEFT_HAND, new TRSRTransformation(new Vector3f(1F, 0F, 1F), TRSRTransformation.quatFromXYZDegrees(new Vector3f(0F, 180F, 0F)), new Vector3f(1F, 1F, 1F), new Quat4f()));
        map.put(ItemCameraTransforms.TransformType.THIRD_PERSON_LEFT_HAND, new TRSRTransformation(new Vector3f(0.1F, 0F + (instrument.handImg.getHeight() <= 16F ? 0F : MathHelper.clamp((float)instrument.info.activeHandPosition[1], -0.3F, 0.3F)), 0.025F - (instrument.handImg.getWidth() <= 16F ? 0F : MathHelper.clamp((float)instrument.info.activeHandPosition[0], -0.5F, 0.5F))), TRSRTransformation.quatFromXYZDegrees(new Vector3f(0F, 80F, 0F)), new Vector3f(-1F, 1F, 1F),  TRSRTransformation.quatFromXYZDegrees(new Vector3f(0F, 0F, 0F))));
        map.put(ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND, new TRSRTransformation(new Vector3f(-0.1F, 0F + (instrument.handImg.getHeight() <= 16F ? 0F : MathHelper.clamp((float)instrument.info.activeHandPosition[1], -0.3F, 0.3F)), 1F - (instrument.handImg.getWidth() <= 16F ? 0F : MathHelper.clamp((float)instrument.info.activeHandPosition[0], -0.5F, 0.5F))), TRSRTransformation.quatFromXYZDegrees(new Vector3f(0F, 80F, 0F)), new Vector3f(1F, 1F, 1F), TRSRTransformation.quatFromXYZDegrees(new Vector3f(0F, 0F, 0F))));
        ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms = ImmutableMap.copyOf(map);
        return PerspectiveMapWrapper.handlePerspective(ModelBaseWrapper.isEntityRender(type) ? instrument.handModel : instrument.iconModel, transforms, type);
    }
    return PerspectiveMapWrapper.handlePerspective(this, transforms, type);
}
项目:CodeChickenLib    文件:AbstractBakedPropertiesModel.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    if (properties instanceof PerspectiveProperties) {
        return PerspectiveMapWrapper.handlePerspective(this, ((PerspectiveProperties) properties).getModelState(), cameraTransformType);
    }
    return IModelParticleProvider.super.handlePerspective(cameraTransformType);
}
项目:enderutilities    文件:ModelNullifierBaked.java   
private ModelNullifierBaked(IModel baseModel, IModel lockedModel, IModelState state, VertexFormat format,
        Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{
    this.modelState = state;
    this.modelBase = baseModel.bake(state, format, bakedTextureGetter);
    this.modelLocked = lockedModel.bake(state, format, bakedTextureGetter);
    this.format = format;
    this.bakedTextureGetter = bakedTextureGetter;
    this.particle = bakedTextureGetter.apply(new ResourceLocation(ModelNullifier.TEX_BASE));
    this.transformMap = PerspectiveMapWrapper.getTransforms(state);
}
项目:OpenBlocks    文件:ModelCanvas.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    final ImmutableMap<TransformType, TRSRTransformation> transforms = PerspectiveMapWrapper.getTransforms(state);

    final IModel base;
    if (baseModel.isPresent()) {
        base = ModelLoaderRegistry.getModelOrLogError(baseModel.get(), "Couldn't load canvas base: " + baseModel.get());
    } else {
        base = ModelLoaderRegistry.getMissingModel();
    }

    final IBakedModel bakedBaseModel = base.bake(state, format, bakedTextureGetter);

    return new BakedModelCanvas(bakedBaseModel, baseModelRenderLayers, transforms, bakedTextureGetter, format);
}
项目:OpenModsLib    文件:BakedEvalModel.java   
public BakedEvalModel(IModel model, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter, ITransformEvaluator evaluator) {
    super(model.bake(state, format, bakedTextureGetter), PerspectiveMapWrapper.getTransforms(state));
    this.model = model;
    this.originalState = state;
    this.format = format;
    this.bakedTextureGetter = bakedTextureGetter;
    this.evaluator = evaluator;
}
项目:OpenModsLib    文件:TexturedItemModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    final IModel untexturedModel = getModel(this.untexturedModel);
    final IBakedModel untexturedBakedModel = untexturedModel.bake(new ModelStateComposition(state, untexturedModel.getDefaultState()), format, bakedTextureGetter);

    final IModel texturedModel = getModel(this.texturedModel);
    final IBakedModel texturedBakedModel = texturedModel.bake(new ModelStateComposition(state, texturedModel.getDefaultState()), format, bakedTextureGetter);

    final ItemOverrideList overrides = new TexturedItemOverrides(untexturedBakedModel, texturedModel, texturedBakedModel.getOverrides().getOverrides(), textures, state, format, bakedTextureGetter);

    return new BakedModel(untexturedBakedModel, PerspectiveMapWrapper.getTransforms(state), overrides);
}
项目:pnc-repressurized    文件:TintedOBJModel.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType)
{
    return PerspectiveMapWrapper.handlePerspective(this, state, cameraTransformType);
}
项目:Adventurers-Toolbox    文件:BakedToolModel.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    return PerspectiveMapWrapper.handlePerspective(this, transforms, cameraTransformType);
}
项目:Adventurers-Toolbox    文件:AxeModel.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    return PerspectiveMapWrapper.handlePerspective(this, transforms, cameraTransformType);
}
项目:Adventurers-Toolbox    文件:ToolHeadModel.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    return PerspectiveMapWrapper.handlePerspective(this, transforms, cameraTransformType);
}
项目:Adventurers-Toolbox    文件:HandpickModel.java   
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
        java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {

    ImmutableMap<TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);

    TRSRTransformation transform = (TRSRTransformation.identity());

    ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();

    if (headTexture != null && haftTexture != null && handleTexture != null) {

        ImmutableList.Builder<ResourceLocation> texBuilder = ImmutableList.builder();
        if (haftTexture != null) {
            texBuilder.add(haftTexture);
        }
        if (headTexture != null) {
            texBuilder.add(headTexture);
        }
        if (handleTexture != null) {
            texBuilder.add(handleTexture);
        }
        if (adornmentTexture != null) {
            texBuilder.add(adornmentTexture);
        }
        ImmutableList<ResourceLocation> textures = texBuilder.build();

        IBakedModel model = (new ItemLayerModel(textures)).bake(state, format, bakedTextureGetter);
        builder.addAll(model.getQuads(null, null, 0));
    }

    return new BakedHandpickModel(this, builder.build(), format, Maps.immutableEnumMap(transformMap),
            Maps.<String, IBakedModel>newHashMap());
}
项目:ExPetrum    文件:ModelIngotBaked.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
{
    return PerspectiveMapWrapper.handlePerspective(this, this.model.getState(), cameraTransformType);
}
项目:enderutilities    文件:ModelEnderBucket.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
{
    return PerspectiveMapWrapper.handlePerspective(this, this.transforms, cameraTransformType);
}
项目:enderutilities    文件:ModelEnderTools.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
{
    return PerspectiveMapWrapper.handlePerspective(this, this.transforms, cameraTransformType);
}
项目:enderutilities    文件:ModelNullifierBaked.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
{
    return PerspectiveMapWrapper.handlePerspective(this, this.transformMap, cameraTransformType);
}
项目:OpenModsLib    文件:EvalExpandModel.java   
public BakedEvalExpandModel(IModel model, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter, IBlockState defaultBlockState, IVarExpander expander) {
    super(model.bake(state, format, bakedTextureGetter), PerspectiveMapWrapper.getTransforms(state));
    this.expander = expander;
    this.defaultBlockState = defaultBlockState;
}
项目:OpenModsLib    文件:BakedModelAdapter.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    return PerspectiveMapWrapper.handlePerspective(this, cameraTransforms, cameraTransformType);
}
项目:CodeChickenLib    文件:IItemRenderer.java   
/**
 * Override this to do more custom transforms that cannot be done through getTransforms.
 * I HIGHLY suggest using getTransforms and just creating a static CCModelState and passing that trough.
 * You should be able to do all perspective aware transforms you need to through that.
 *
 * @param cameraTransformType The transform type.
 * @return The IBakedModel to actually render and the Matrix4 to apply as transforms.
 */
@Override
default Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    CCRenderItem.notifyTransform(cameraTransformType);
    return PerspectiveMapWrapper.handlePerspective(this, getTransforms(), cameraTransformType);
}