当前位置: 首页>>代码示例>>Java>>正文


Java RenderItem.setRenderManager方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.entity.RenderItem.setRenderManager方法的典型用法代码示例。如果您正苦于以下问题:Java RenderItem.setRenderManager方法的具体用法?Java RenderItem.setRenderManager怎么用?Java RenderItem.setRenderManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.entity.RenderItem的用法示例。


在下文中一共展示了RenderItem.setRenderManager方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RenderHelper

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderHelper()
{
    renderer = new RenderItem()
    {
        public boolean shouldSpreadItems()
        {
            return false;
        }

        public boolean shouldBob()
        {
            return false;
        }
    };
    renderer.setRenderManager(RenderManager.instance);
    renderer.renderInFrame = true;
    entityItem.hoverStart = 0F;
}
 
开发者ID:Micky2506,项目名称:UdaldorDecor,代码行数:19,代码来源:RenderHelper.java

示例2: renderInventoryBlock

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
    RenderItem itemRenderer = new RenderItem();

    ItemStack itemStackToRender = new ItemStack(block, 1, metadata);

    itemRenderer.setRenderManager(RenderManager.instance);
    EntityItem entityItemToRender = new EntityItem(Minecraft.getMinecraft().theWorld, 0, 0, 0, itemStackToRender);
    entityItemToRender.hoverStart = 0;

    float scaleItem = 1.5f;
    GL11.glPushMatrix();

    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    GL11.glRotatef((float) (90f * Math.PI / 180f), 1, 0, 0);
    GL11.glScalef(scaleItem, scaleItem, scaleItem);
    itemRenderer.doRender(entityItemToRender, 0, 0, 0, 0, 0);
    GL11.glPopMatrix();
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10-pre-1.3a,代码行数:20,代码来源:RenderCampFire.java

示例3: EnergyContainerTESR

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public EnergyContainerTESR() {
    texture = new ResourceLocation("minecraft:textures/blocks/planks_oak.png");
    model = AdvancedModelLoader.loadModel(new ResourceLocation("biotechmod:models/energyContainer.obj"));
    potato = new RenderItem() {
        public boolean shouldBob() {
            return false;
        }
        public boolean shouldSpreadItems() {
            return false;
        }
    };
    dummy = new EntityItem(null);
    dummy.hoverStart = 0.0f;
    dummy.motionX = 0.0f;
    dummy.motionY = 0.0f;
    dummy.motionZ = 0.0f;
    potato.setRenderManager(RenderManager.instance);
}
 
开发者ID:HotelCalifornia,项目名称:BiotechMod,代码行数:19,代码来源:EnergyContainerTESR.java

示例4: ModelDrawingHelper

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public ModelDrawingHelper(ModelRobot model, TileFactoryController tile, ResourceLocation texture, int canvasWidth, int canvasHeight, float scale)
{
    this.model = model;
    this.texture = texture;
    this.canvasWidth = canvasWidth;
    this.canvasHeight = canvasHeight;
    this.scale = scale;
    this.tile = tile;
    customRenderItem = new RenderItem()
    {
        @Override
        public boolean shouldBob()
        {
            return false;
        }
    };

    customRenderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:PaleoCrafter,项目名称:R0b0ts,代码行数:20,代码来源:ModelDrawingHelper.java

示例5: RenderTileEntityWoolColorizer

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderTileEntityWoolColorizer() {
	mc = FMLClientHandler.instance().getClient();
	renderBlocks = new RenderBlocks();
	renderItem = new RenderItem() {
		@Override
		public boolean shouldBob() {
			return false;
		}

		@Override
		public boolean shouldSpreadItems() {
			return false;
		}
	};
	renderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:Techjar,项目名称:HexWool,代码行数:17,代码来源:RenderTileEntityWoolColorizer.java

示例6: RenderAlchemicalCondenser

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderAlchemicalCondenser() {
    customRenderItem = new RenderItem() {
        @Override
        public boolean shouldBob() {

            return false;
        }
    };
    customRenderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:Lomeli12,项目名称:SimpleCondenser,代码行数:11,代码来源:RenderAlchemicalCondenser.java

示例7: RenderAutoChisel

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderAutoChisel() {
	Chisel.renderAutoChiselId = RenderingRegistry.getNextAvailableRenderId();

	renderItem = new RenderItem() {

		@Override
		public boolean shouldBob() {
			return false;
		}
	};
	renderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:Chisel-2,项目名称:Chisel-2,代码行数:13,代码来源:RenderAutoChisel.java

示例8: renderTileEntity

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
private void renderTileEntity(TileEntityBrewingBase tileEntity, double xRenderCoord, double yRenderCoord,
        double zRenderCoord, float var8) {
    RenderItem itemRenderer = new RenderItem();
    itemRenderer.setRenderManager(RenderManager.instance);

    ItemStack ingredientStack = tileEntity.brewingItemStacks[tileEntity.brewingItemStacks.length - 1];
    if (ingredientStack != null) {
        if (ingredientStack.stackSize > 1) {
            renderItemStack(ingredientStack, itemRenderer, tileEntity.getWorldObj(), xRenderCoord, yRenderCoord + 0.3D,
                    zRenderCoord, (float) (Math.pow(400 - tileEntity.getBrewTime(), 2)) / 20 + 90f, 0.28f);
        } else {
            renderItemStack(ingredientStack, itemRenderer, tileEntity.getWorldObj(), xRenderCoord, yRenderCoord + 0.3D,
                    zRenderCoord, (float) (Math.pow(400 - tileEntity.getBrewTime(), 2)) / 20 + 90f, 0.4f);
        }
    }

    float[] zOffsets = new float[] { 0, +0.29f, -0.29f };
    float[] rotation = new float[] { 90f, 0.0f, 0.0f };
    for (int i = 0; i < tileEntity.brewingItemStacks.length - 1; i++) {
        ItemStack stackToRender = tileEntity.brewingItemStacks[i];
        if (stackToRender == null) {
            continue;
        }
        renderItemStack(stackToRender, itemRenderer, tileEntity.getWorldObj(), xRenderCoord, yRenderCoord - 0.25D,
                zRenderCoord + zOffsets[i], rotation[i], 0.6f);
    }
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10-pre-1.3a,代码行数:28,代码来源:TileEntityBrewingStandRenderer.java

示例9: RenderTileSocketTable

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderTileSocketTable() {
	dummyRenderItem = new RenderItem() {
		@Override
		public boolean shouldBob() {
			return false;
		}
		
		@Override
		public boolean shouldSpreadItems() {
			return false;
		}
	};
	dummyRenderItem.setRenderManager(RenderManager.instance);
	
	// TEMA: this is the shader callback where the uniforms are set for this particular shader.
	// it's called each frame when the shader is bound. Probably the most expensive part of the whole thing.
	// you might be able to even call this once per frame instead of once per draw, pointing call at the program instead of passing this in useShader.
	shaderCallback = new ShaderCallback() {
		@Override
		public void call(int shader) {
			Minecraft mc = Minecraft.getMinecraft();

			int x = ARBShaderObjects.glGetUniformLocationARB(shader, "yaw");
			ARBShaderObjects.glUniform1fARB(x, (float)((mc.thePlayer.rotationYaw * 2 * Math.PI) / 360.0));
			
			int z = ARBShaderObjects.glGetUniformLocationARB(shader, "pitch");
			ARBShaderObjects.glUniform1fARB(z, - (float)((mc.thePlayer.rotationPitch * 2 * Math.PI) / 360.0));
		}
	};
}
 
开发者ID:TTFTCUTS,项目名称:ShadowsOfPhysis,代码行数:31,代码来源:RenderTileSocketTable.java

示例10: RenderRobot

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderRobot()
{
    super(new ModelRobot(), 0.5F);
    customRenderItem = new RenderItem()
    {
        @Override
        public boolean shouldBob()
        {
            return false;
        }
    };

    customRenderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:PaleoCrafter,项目名称:R0b0ts,代码行数:15,代码来源:RenderRobot.java

示例11: RenderAnalyzer

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderAnalyzer() {
    customRenderItem = new RenderItem() {
        @Override public boolean shouldBob() { return true; }
    	@Override public boolean shouldSpreadItems() { return false; };
    };
    customRenderItem.setRenderManager(RenderManager.instance);	    
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:8,代码来源:RenderAnalyzer.java

示例12: RenderEntityChopperSeeds

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderEntityChopperSeeds(){
    itemRenderer = new RenderItem(){
        @Override
        public boolean shouldBob(){

            return false;
        };
    };
    itemRenderer.setRenderManager(RenderManager.instance);
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:11,代码来源:RenderEntityChopperSeeds.java

示例13: RenderDroneAI

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public RenderDroneAI(EntityDrone drone){
    this.drone = drone;
    renderItem = new RenderItem();
    renderItem.setRenderManager(RenderManager.instance);
    entityItem = new EntityItem(drone.worldObj);
    update();
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:8,代码来源:RenderDroneAI.java

示例14: TileEntityRenderWeaponCarver

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public TileEntityRenderWeaponCarver(){
	customRenderItem = new RenderItem() {

		@Override
		public boolean shouldBob() {

			return false;
		};
	};
	customRenderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:Pumuckl007,项目名称:WeaponsMod,代码行数:12,代码来源:TileEntityRenderWeaponCarver.java

示例15: TileEntityRenderSS

import net.minecraft.client.renderer.entity.RenderItem; //导入方法依赖的package包/类
public TileEntityRenderSS(){
	customRenderItem = new RenderItem() {

		@Override
		public boolean shouldBob() {

			return false;
		};
	};
	customRenderItem.setRenderManager(RenderManager.instance);
}
 
开发者ID:Pumuckl007,项目名称:WeaponsMod,代码行数:12,代码来源:TileEntityRenderSS.java


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