Search in sources :

Example 1 with BlockTransceiver

use of crazypants.enderio.machines.machine.transceiver.BlockTransceiver in project EnderIO by SleepyTrousers.

the class TransceiverRenderer method renderTileEntity.

@Override
protected void renderTileEntity(@Nonnull TileTransceiver te, @Nonnull IBlockState blockState, float partialTicks, int destroyStage) {
    TextureAtlasSprite icon = ((BlockTransceiver) block_transceiver.getBlockNN()).getPortalIcon();
    if (icon == null) {
        return;
    }
    float time = Math.abs(50 - (EnderIO.proxy.getTickCount() % 100)) / 50f;
    float localScale = scale + 0.05f - time * 0.1f;
    float alpha = 0.7f + time * 0.25f;
    BoundingBox bb = BoundingBox.UNIT_CUBE.scale(localScale, localScale, localScale);
    GlStateManager.color(1, 1, 1, alpha);
    GlStateManager.enableNormalize();
    RenderUtil.renderBoundingBox(bb, icon);
    GlStateManager.disableNormalize();
}
Also used : TextureAtlasSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite) BoundingBox(com.enderio.core.client.render.BoundingBox) BlockTransceiver(crazypants.enderio.machines.machine.transceiver.BlockTransceiver)

Aggregations

BoundingBox (com.enderio.core.client.render.BoundingBox)1 BlockTransceiver (crazypants.enderio.machines.machine.transceiver.BlockTransceiver)1 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)1