本文整理汇总了Java中net.minecraft.entity.item.EntityFallingSand.getWorld方法的典型用法代码示例。如果您正苦于以下问题:Java EntityFallingSand.getWorld方法的具体用法?Java EntityFallingSand.getWorld怎么用?Java EntityFallingSand.getWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.item.EntityFallingSand
的用法示例。
在下文中一共展示了EntityFallingSand.getWorld方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRenderFallingSand
import net.minecraft.entity.item.EntityFallingSand; //导入方法依赖的package包/类
/**
* The actual render method that is used in doRender
*/
public void doRenderFallingSand(EntityFallingSand par1EntityFallingSand, double par2, double par4, double par6, float par8, float par9)
{
World world = par1EntityFallingSand.getWorld();
Block block = Block.blocksList[par1EntityFallingSand.blockID];
if (world.getBlockId(MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ)) != par1EntityFallingSand.blockID)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
this.bindEntityTexture(par1EntityFallingSand);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator;
if (block instanceof BlockAnvil && block.getRenderType() == 35)
{
this.sandRenderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F));
this.sandRenderBlocks.renderBlockAnvilMetadata((BlockAnvil)block, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.metadata);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else if (block.getRenderType() == 27)
{
this.sandRenderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F));
this.sandRenderBlocks.renderBlockDragonEgg((BlockDragonEgg)block, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ));
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else if (block != null)
{
this.sandRenderBlocks.setRenderBoundsFromBlock(block);
this.sandRenderBlocks.renderBlockSandFalling(block, world, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.metadata);
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
}