Skip to content

Commit 2660a6a

Browse files
committed
Make content rendering for multiblocks stay inside the multiblock instead of extend to be inside the glass
1 parent 9ee9a65 commit 2660a6a

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/main/java/mekanism/client/render/data/RenderData.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@ public Builder<DATA_TYPE> dimensions(int width, int height, int length) {
108108
}
109109

110110
public Builder<DATA_TYPE> of(MultiblockData multiblock) {
111-
return location(Objects.requireNonNull(multiblock.renderLocation, "Render location may not be null."))
112-
.height(multiblock.height() - 2)
113-
.length(multiblock.length())
114-
.width(multiblock.width());
111+
return location(Objects.requireNonNull(multiblock.renderLocation, "Render location may not be null.").offset(1, 0, 1))
112+
.dimensions(multiblock.width() - 2, multiblock.height() - 2, multiblock.length() - 2);
115113
}
116114

117115
public DATA_TYPE build() {

src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationPlant.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ protected void render(TileEntityThermalEvaporationController tile, EvaporationMu
2626
int light, int overlayLight, ProfilerFiller profiler) {
2727
VertexConsumer buffer = renderer.getBuffer(Sheets.translucentCullBlockSheet());
2828
FluidRenderData data = RenderData.Builder.create(multiblock.inputTank.getFluid())
29-
.location(multiblock.renderLocation.offset(1, 0, 1))
30-
.dimensions(2, multiblock.height() - 1, 2)
29+
.of(multiblock)
30+
.height(multiblock.height() - 1)
3131
.build();
3232
renderObject(data, multiblock.valves, tile.getBlockPos(), matrix, buffer, overlayLight, Math.min(1, multiblock.prevScale));
3333
}

src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected void render(TileEntityBoilerCasing tile, BoilerMultiblockData multiblo
4646
}
4747
RenderData data = RenderData.Builder.create(multiblock.steamTank.getStack())
4848
.of(multiblock)
49-
.location(multiblock.upperRenderLocation)
49+
.location(multiblock.upperRenderLocation.offset(1, 0, 1))
5050
.height(height)
5151
.build();
5252
renderObject(data, pos, matrix, buffer, overlayLight, multiblock.prevSteamScale);

0 commit comments

Comments
 (0)