• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IRetexturableModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraftforge.client.model.IRetexturableModel的典型用法代码示例。如果您正苦于以下问题:Java IRetexturableModel类的具体用法?Java IRetexturableModel怎么用?Java IRetexturableModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IRetexturableModel类属于net.minecraftforge.client.model包,在下文中一共展示了IRetexturableModel类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onModelBake

import net.minecraftforge.client.model.IRetexturableModel; //导入依赖的package包/类
@SubscribeEvent
public void onModelBake(ModelBakeEvent event)
{
    try
    {
        IModel model = ModelLoaderRegistry.getModel(MODEL_grave);
        if (model instanceof IRetexturableModel)
        {
            IRetexturableModel graveModel = (IRetexturableModel) model;
            IBakedModel standard = event.getModelRegistry().getObject(locGrave);
            IBakedModel finalModel = new GoodGraveModel(standard, graveModel);
            event.getModelRegistry().putObject(locGrave, finalModel);
        }
    } catch (Exception e)
    {
        e.printStackTrace();
    }
}
 
开发者ID:M4thG33k,项目名称:TombManyGraves,代码行数:19,代码来源:TombManyGravesClientEvents.java


示例2: onModelBaked

import net.minecraftforge.client.model.IRetexturableModel; //导入依赖的package包/类
@SubscribeEvent
public void onModelBaked(ModelBakeEvent modelBakeEvent){
    setLoader(modelBakeEvent.getModelLoader());
    for(Item shield : BattlegearConfig.shield) {
        if(shield!=null) {
            ModelResourceLocation mainLoc = DefaultMesh.INVENTORY.getModelLocation(new ItemStack(shield));
            ResourceLocation itemLoc = new ResourceLocation(mainLoc.getResourceDomain(), "item/" + mainLoc.getResourcePath());
            IModel originalModel = getModel(itemLoc);
            if(originalModel instanceof IRetexturableModel){
                ModelBlock internalFrontModel = getInternalModel(originalModel);
                if (internalFrontModel != null) {
                    ModelBlock front = makeItem(internalFrontModel);
                    IBakedModel baked = wrap(join((IRetexturableModel) originalModel, front), itemLoc);
                    if(baked != null)
                        modelBakeEvent.getModelRegistry().putObject(mainLoc, baked);
                }
            }
        }
    }
    setLoader(null);
}
 
开发者ID:Mine-and-blade-admin,项目名称:Battlegear2,代码行数:22,代码来源:ShieldModelLoader.java


示例3: retexture

import net.minecraftforge.client.model.IRetexturableModel; //导入依赖的package包/类
public static IModel retexture(Map<String, String> textures, IModel blockModel) {
		if (blockModel instanceof IRetexturableModel)
			return ((IRetexturableModel) blockModel).retexture(ImmutableMap.copyOf(textures));
//		else if (blockModel instanceof MultiModel) {
//			Map<String, Pair<IModel, IModelState>> parts = Maps.newHashMap();
//			for (Entry<String, Pair<IModel, IModelState>> entry : ((MultiModel) blockModel).getParts()
//					.entrySet()) {
//				parts.put(entry.getKey(), Pair.of(retexture(textures, entry.getValue().getLeft()),
//						entry.getValue().getRight()));
//			}
//			return new MultiModel(retexture(textures, ((MultiModel) blockModel).getBaseModel()),
//					blockModel.getDefaultState(), parts);
//		}
		return blockModel;
	}
 
开发者ID:hea3ven,项目名称:CommonUtils,代码行数:16,代码来源:BakerUtil.java


示例4: onTextureStitch

import net.minecraftforge.client.model.IRetexturableModel; //导入依赖的package包/类
@SubscribeEvent
public void onTextureStitch(TextureStitchEvent.Pre event) {
    RenderUtil.loadSprites("factorization", FzIcons.class, "", event);
    RenderUtil.loadSprites("factorization", BarrelModel.class, "blocks/storage/", event);
    try {
        BarrelModel.template = (IRetexturableModel) ModelLoaderRegistry.getModel(new ResourceLocation("factorization:block/barrel_template"));
        IModel socketBase = ModelLoaderRegistry.getModel(new ResourceLocation("factorization:block/socket"));
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:12,代码来源:FactorizationClientProxy.java


示例5: GoodGraveModel

import net.minecraftforge.client.model.IRetexturableModel; //导入依赖的package包/类
public GoodGraveModel(IBakedModel standard, IRetexturableModel retexturableModel)
{
    this.standard = standard;
    this.retexturableModel = retexturableModel;
}
 
开发者ID:M4thG33k,项目名称:TombManyGraves,代码行数:6,代码来源:GoodGraveModel.java



注:本文中的net.minecraftforge.client.model.IRetexturableModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StructureLoaderBuilder类代码示例发布时间:2022-05-23
下一篇:
Java FuncLast类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap