本文整理匯總了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;
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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));
}
};
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}