Skip to content

Commit

Permalink
fix for race condition in cable renderer (e.g. VS Ships)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiakil committed Nov 19, 2024
1 parent f238deb commit 0369408
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public RenderUniversalCable(BlockEntityRendererProvider.Context context) {
protected void render(TileEntityUniversalCable tile, float partialTick, PoseStack matrix, MultiBufferSource renderer, int light, int overlayLight,
ProfilerFiller profiler) {
EnergyNetwork network = tile.getTransmitter().getTransmitterNetwork();
if (network == null) {
return;//race condition perhaps
}
matrix.pushPose();
matrix.translate(0.5, 0.5, 0.5);
renderModel(tile, matrix, renderer.getBuffer(Sheets.translucentCullBlockSheet()), 0xFFFFFF, network.currentScale, LightTexture.FULL_BRIGHT,
Expand Down

0 comments on commit 0369408

Please sign in to comment.