本文整理汇总了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;未经允许,请勿转载。 |
请发表评论