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
(cherry picked from commit 0369408)
  • Loading branch information
thiakil committed Nov 19, 2024
1 parent 94ede8c commit 3d95fba
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 3d95fba

Please sign in to comment.