本文整理汇总了Java中net.minecraft.client.resources.model.ModelManager类的典型用法代码示例。如果您正苦于以下问题:Java ModelManager类的具体用法?Java ModelManager怎么用?Java ModelManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelManager类属于net.minecraft.client.resources.model包,在下文中一共展示了ModelManager类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: RenderItem
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public RenderItem(TextureManager textureManager, ModelManager modelManager)
{
this.textureManager = textureManager;
Config.setModelManager(modelManager);
if (Reflector.ItemModelMesherForge_Constructor.exists())
{
this.itemModelMesher = (ItemModelMesher)Reflector.newInstance(Reflector.ItemModelMesherForge_Constructor, new Object[] {modelManager});
}
else
{
this.itemModelMesher = new ItemModelMesher(modelManager);
}
this.registerItems();
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:17,代码来源:RenderItem.java
示例2: doRender
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
BlockPos blockpos = entity.getHangingPosition();
double d0 = (double)blockpos.getX() - entity.posX + x;
double d1 = (double)blockpos.getY() - entity.posY + y;
double d2 = (double)blockpos.getZ() - entity.posZ + z;
GlStateManager.translate(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D);
GlStateManager.rotate(180.0F - entity.rotationYaw, 0.0F, 1.0F, 0.0F);
this.renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
BlockRendererDispatcher blockrendererdispatcher = this.mc.getBlockRendererDispatcher();
ModelManager modelmanager = blockrendererdispatcher.getBlockModelShapes().getModelManager();
IBakedModel ibakedmodel;
if (entity.getDisplayedItem() != null && entity.getDisplayedItem().getItem() == Items.filled_map)
{
ibakedmodel = modelmanager.getModel(this.mapModel);
}
else
{
ibakedmodel = modelmanager.getModel(this.itemFrameModel);
}
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
GlStateManager.translate(0.0F, 0.0F, 0.4375F);
this.renderItem(entity);
GlStateManager.popMatrix();
this.renderName(entity, x + (double)((float)entity.facingDirection.getFrontOffsetX() * 0.3F), y - 0.25D, z + (double)((float)entity.facingDirection.getFrontOffsetZ() * 0.3F));
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:39,代码来源:RenderItemFrame.java
示例3: RenderItem
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public RenderItem(TextureManager textureManager, ModelManager modelManager)
{
this.textureManager = textureManager;
this.itemModelMesher = new ItemModelMesher(modelManager);
this.registerItems();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:7,代码来源:RenderItem.java
示例4: ItemModelMesher
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public ItemModelMesher(ModelManager modelManager)
{
this.modelManager = modelManager;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:ItemModelMesher.java
示例5: getModelManager
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public ModelManager getModelManager()
{
return this.modelManager;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:ItemModelMesher.java
示例6: BlockModelShapes
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public BlockModelShapes(ModelManager manager)
{
this.modelManager = manager;
this.registerAllBlocks();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:BlockModelShapes.java
示例7: setModelManager
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public static void setModelManager(ModelManager p_setModelManager_0_)
{
modelManager = p_setModelManager_0_;
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:Config.java
示例8: getModelManager
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public static ModelManager getModelManager()
{
return modelManager;
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:Config.java
示例9: getModelCull
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
static IBakedModel getModelCull(String p_getModelCull_0_, List p_getModelCull_1_)
{
ModelManager modelmanager = Config.getModelManager();
if (modelmanager == null)
{
return null;
}
else
{
ResourceLocation resourcelocation = new ResourceLocation("blockstates/" + p_getModelCull_0_ + "_leaves.json");
if (Config.getDefiningResourcePack(resourcelocation) != Config.getDefaultResourcePack())
{
return null;
}
else
{
ResourceLocation resourcelocation1 = new ResourceLocation("models/block/" + p_getModelCull_0_ + "_leaves.json");
if (Config.getDefiningResourcePack(resourcelocation1) != Config.getDefaultResourcePack())
{
return null;
}
else
{
ModelResourceLocation modelresourcelocation = new ModelResourceLocation(p_getModelCull_0_ + "_leaves", "normal");
IBakedModel ibakedmodel = modelmanager.getModel(modelresourcelocation);
if (ibakedmodel != null && ibakedmodel != modelmanager.getMissingModel())
{
List list = ibakedmodel.getGeneralQuads();
if (list.size() == 0)
{
return ibakedmodel;
}
else if (list.size() != 6)
{
return null;
}
else
{
for (Object bakedquad : list)
{
List list1 = ibakedmodel.getFaceQuads(((BakedQuad) bakedquad).getFace());
if (list1.size() > 0)
{
return null;
}
list1.add(bakedquad);
}
list.clear();
p_getModelCull_1_.add(p_getModelCull_0_ + "_leaves");
return ibakedmodel;
}
}
else
{
return null;
}
}
}
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:69,代码来源:SmartLeaves.java
示例10: EZItemRenderer
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
public EZItemRenderer(TextureManager textureManager,
ModelManager modelManager) {
super(textureManager, modelManager);
}
开发者ID:zerofall,项目名称:EZStorage,代码行数:5,代码来源:EZItemRenderer.java
示例11: init
import net.minecraft.client.resources.model.ModelManager; //导入依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event)
{
if (exempleEnabled)
{
logger.info("Registering ISBRH Block Exemple...");
testId = RenderRegistry.getNextAvailableRenderId();
GameRegistry.registerBlock(test, "test");
RenderRegistry.registerBlockHandler(new RenderExample());
RenderRegistry.registerTextureHandler((ITextureHandler) test);
}
Minecraft mc = Minecraft.getMinecraft();
// Prerequisite
ModelManager modelManager = ObfuscationReflectionHelper
.getPrivateValue(Minecraft.class, mc, "aL", "field_175617_aL",
"modelManager");
RenderManager renderManager = mc.getRenderManager();
IReloadableResourceManager resourceManager = ((IReloadableResourceManager) mc
.getResourceManager());
// Render Item Hook
RenderItem item = new RenderItemISBRH(mc.getTextureManager(),
modelManager, mc.getRenderItem());
ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, mc, item,
"X", "field_175621_X", "renderItem");
ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, mc,
new ItemRenderer(mc), "Y", "field_175620_Y", "itemRenderer");
renderManager.entityRenderMap.remove(EntityItem.class);
renderManager.entityRenderMap.put(EntityItem.class,
new RenderEntityItem(renderManager, item));
renderManager.entityRenderMap.remove(EntityItemFrame.class);
renderManager.entityRenderMap.put(EntityItemFrame.class,
new RenderItemFrame(renderManager, item));
mc.entityRenderer = new EntityRenderer(mc, resourceManager);
// Render Block Dispatcher Hook
BlockRendererDispatcher rendererDispatcher = new ISBRHDispatcher(
mc.getBlockRendererDispatcher(), modelManager.getBlockModelShapes(), mc.gameSettings);
ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, mc,
rendererDispatcher, "aM", "field_175618_aM",
"blockRenderDispatcher");
// Register Reload Listeners
resourceManager.registerReloadListener(rendererDispatcher);
resourceManager.registerReloadListener(item);
resourceManager.registerReloadListener(mc.entityRenderer);
}
开发者ID:Thog,项目名称:ISBRH,代码行数:51,代码来源:ISBRH.java
注:本文中的net.minecraft.client.resources.model.ModelManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论