Advertisement
PaleoCrafter

Untitled

Sep 2nd, 2014
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.30 KB | None | 0 0
  1. override def doRender(entity: Entity, x: Double, y: Double, z: Double, partialTicks: Float, p_76986_9_ : Float): Unit = {
  2.   val pulled = entity.asInstanceOf[EntityPulledBlock]
  3.   GL11.glPushMatrix()
  4.   GL11.glTranslated(x, y, z)
  5.   bindEntityTexture(entity)
  6.   GL11.glEnable(GL11.GL_BLEND)
  7.   GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
  8.   GL11.glDisable(GL11.GL_ALPHA_TEST)
  9.   GL11.glDisable(GL11.GL_LIGHTING)
  10.   val tess = Tessellator.instance
  11.   this.field_147909_c.blockAccess = entity.worldObj
  12.   val block = pulled.block
  13.   tess.startDrawingQuads()
  14.   tess.setTranslation(-MathHelper.floor_double(entity.posX) - 0.5F, -MathHelper.floor_double(entity.posY) - 0.5F, -MathHelper.floor_double(entity.posZ) - 0.5F)
  15.   if (block.canRenderInPass(MinecraftForgeClient.getRenderPass)) {
  16.     if (!this.field_147909_c.renderBlockByRenderType(block, MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ)))
  17.       this.field_147909_c.renderStandardBlock(block, MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ))
  18.   }
  19.   tess.setTranslation(0, 0, 0)
  20.   tess.draw()
  21.   GL11.glDisable(GL11.GL_BLEND)
  22.   GL11.glEnable(GL11.GL_ALPHA_TEST)
  23.   GL11.glEnable(GL11.GL_LIGHTING)
  24.   GL11.glPopMatrix()
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement