Skip to content

Commit 68a92ee

Browse files
committed
Renderpass 0->1 for blocks that feature windows
1 parent 127e0d4 commit 68a92ee

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

src/main/java/com/carpentersblocks/block/BlockCarpentersDaylightSensor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,10 @@ public int getRenderType()
249249
return BlockRegistry.carpentersDaylightSensorRenderID;
250250
}
251251

252+
//Always render the block as translucent so glass can be shiny in MEGA, at the cost of some performance.
253+
@Override
254+
public int getRenderBlockPass() {
255+
return 1;
256+
}
257+
252258
}

src/main/java/com/carpentersblocks/block/BlockCarpentersDoor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ public int getRenderType()
9393
return BlockRegistry.carpentersDoorRenderID;
9494
}
9595

96+
//Always render the block as translucent so glass can be shiny in MEGA, at the cost of some performance.
97+
@Override
98+
public int getRenderBlockPass() {
99+
return 1;
100+
}
101+
96102
@Override
97103
public ForgeDirection[] getValidRotations(World worldObj, int x, int y,int z)
98104
{

src/main/java/com/carpentersblocks/block/BlockCarpentersFlowerPot.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,4 +412,10 @@ public TileEntity createNewTileEntity(World world, int metadata) {
412412
public int getRenderType() {
413413
return BlockRegistry.carpentersFlowerPotRenderID;
414414
}
415+
416+
//Always render the block as translucent so glass can be shiny in MEGA, at the cost of some performance.
417+
@Override
418+
public int getRenderBlockPass() {
419+
return 1;
420+
}
415421
}

src/main/java/com/carpentersblocks/block/BlockCarpentersGarageDoor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@ public int getRenderType()
470470
return BlockRegistry.carpentersGarageDoorRenderID;
471471
}
472472

473+
//Always render the block as translucent so glass can be shiny in MEGA, at the cost of some performance.
474+
@Override
475+
public int getRenderBlockPass() {
476+
return 1;
477+
}
478+
473479
@Override
474480
public ForgeDirection[] getValidRotations(World worldObj, int x, int y,int z)
475481
{

src/main/java/com/carpentersblocks/block/BlockCarpentersHatch.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,13 @@ public int getRenderType()
377377
return BlockRegistry.carpentersHatchRenderID;
378378
}
379379

380+
//Always render the block as translucent so glass can be shiny in MEGA, at the cost of some performance.
381+
@Override
382+
public int getRenderBlockPass() {
383+
return 1;
384+
}
385+
386+
380387
@Override
381388
public ForgeDirection[] getValidRotations(World worldObj, int x, int y,int z)
382389
{

src/main/java/com/carpentersblocks/block/BlockCarpentersTorch.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,10 @@ public int getRenderType()
256256
return BlockRegistry.carpentersTorchRenderID;
257257
}
258258

259+
//Always render the block as translucent so glass can be shiny in MEGA, at the cost of some performance.
260+
@Override
261+
public int getRenderBlockPass() {
262+
return 1;
263+
}
264+
259265
}

0 commit comments

Comments
 (0)