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();
}
Aggregations