Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override def doRender(entity: Entity, x: Double, y: Double, z: Double, partialTicks: Float, p_76986_9_ : Float): Unit = {
- val pulled = entity.asInstanceOf[EntityPulledBlock]
- GL11.glPushMatrix()
- GL11.glTranslated(x, y, z)
- bindEntityTexture(entity)
- GL11.glEnable(GL11.GL_BLEND)
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
- GL11.glDisable(GL11.GL_ALPHA_TEST)
- GL11.glDisable(GL11.GL_LIGHTING)
- val tess = Tessellator.instance
- this.field_147909_c.blockAccess = entity.worldObj
- val block = pulled.block
- tess.startDrawingQuads()
- tess.setTranslation(-MathHelper.floor_double(entity.posX) - 0.5F, -MathHelper.floor_double(entity.posY) - 0.5F, -MathHelper.floor_double(entity.posZ) - 0.5F)
- if (block.canRenderInPass(MinecraftForgeClient.getRenderPass)) {
- if (!this.field_147909_c.renderBlockByRenderType(block, MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ)))
- this.field_147909_c.renderStandardBlock(block, MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ))
- }
- tess.setTranslation(0, 0, 0)
- tess.draw()
- GL11.glDisable(GL11.GL_BLEND)
- GL11.glEnable(GL11.GL_ALPHA_TEST)
- GL11.glEnable(GL11.GL_LIGHTING)
- GL11.glPopMatrix()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement