本文整理汇总了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);
}