當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。