|
40 | 40 | import mekanism.common.registries.MekanismParticleTypes; |
41 | 41 | import mekanism.common.tile.TileEntityBoundingBlock; |
42 | 42 | import mekanism.common.tile.component.TileComponentConfig; |
43 | | -import mekanism.common.tile.component.config.DataType; |
| 43 | +import mekanism.common.tile.component.config.ConfigInfo; |
44 | 44 | import mekanism.common.tile.interfaces.ISideConfiguration; |
45 | 45 | import mekanism.common.util.MekanismUtils; |
46 | 46 | import mekanism.common.util.WorldUtils; |
@@ -463,18 +463,21 @@ public void onBlockHover(RenderHighlightEvent.Block event) { |
463 | 463 | TileComponentConfig config = configurable.getConfig(); |
464 | 464 | if (config.supports(type)) { |
465 | 465 | Direction face = rayTraceResult.getDirection(); |
466 | | - DataType dataType = config.getDataType(type, RelativeSide.fromDirections(configurable.getDirection(), face)); |
467 | | - if (dataType != null) { |
468 | | - Vec3 viewPosition = info.getPosition(); |
469 | | - matrix.pushPose(); |
470 | | - matrix.translate(pos.getX() - viewPosition.x, pos.getY() - viewPosition.y, pos.getZ() - viewPosition.z); |
471 | | - @Nullable Model3D object = getOverlayModel(face, type); |
472 | | - VertexConsumer buffer = renderer.getBuffer(Sheets.translucentCullBlockSheet()); |
473 | | - int argb = MekanismRenderer.getColorARGB(dataType.getColor(), 0.6F); |
474 | | - if (object != null) { |
475 | | - RenderResizableCuboid.renderCube(object, matrix, buffer, argb, LightTexture.FULL_BRIGHT, OverlayTexture.NO_OVERLAY, FaceDisplay.FRONT, info, null); |
| 466 | + ConfigInfo configInfo = config.getConfig(type); |
| 467 | + if (configInfo != null) { |
| 468 | + RelativeSide side = RelativeSide.fromDirections(configurable.getDirection(), face); |
| 469 | + if (configInfo.isSideEnabled(side)) { |
| 470 | + Vec3 viewPosition = info.getPosition(); |
| 471 | + matrix.pushPose(); |
| 472 | + matrix.translate(pos.getX() - viewPosition.x, pos.getY() - viewPosition.y, pos.getZ() - viewPosition.z); |
| 473 | + @Nullable Model3D object = getOverlayModel(face, type); |
| 474 | + VertexConsumer buffer = renderer.getBuffer(Sheets.translucentCullBlockSheet()); |
| 475 | + int argb = MekanismRenderer.getColorARGB(configInfo.getDataType(side).getColor(), 0.6F); |
| 476 | + if (object != null) { |
| 477 | + RenderResizableCuboid.renderCube(object, matrix, buffer, argb, LightTexture.FULL_BRIGHT, OverlayTexture.NO_OVERLAY, FaceDisplay.FRONT, info, null); |
| 478 | + } |
| 479 | + matrix.popPose(); |
476 | 480 | } |
477 | | - matrix.popPose(); |
478 | 481 | } |
479 | 482 | } |
480 | 483 | } |
|
0 commit comments