mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Re-enable rendering of the GreenHouse glass and add culling
This commit is contained in:
parent
63719ef06f
commit
817797ad3a
3 changed files with 48 additions and 58 deletions
|
@ -118,6 +118,8 @@ public class ActuallyAdditionsClient {
|
||||||
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.RICE.get(), RenderType.cutout());
|
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.RICE.get(), RenderType.cutout());
|
||||||
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.FLAX.get(), RenderType.cutout());
|
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.FLAX.get(), RenderType.cutout());
|
||||||
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.COFFEE.get(), RenderType.cutout());
|
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.COFFEE.get(), RenderType.cutout());
|
||||||
|
|
||||||
|
ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.GREENHOUSE_GLASS.get(), RenderType.cutout());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupSpecialRenders(EntityRenderersEvent.RegisterRenderers event) {
|
public static void setupSpecialRenders(EntityRenderersEvent.RegisterRenderers event) {
|
||||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
|
@ -40,11 +41,14 @@ public class BlockGreenhouseGlass extends BlockBase {
|
||||||
//
|
//
|
||||||
// return state != otherState || block != this && super.shouldSideBeRendered(state, world, pos, side);
|
// return state != otherState || block != this && super.shouldSideBeRendered(state, world, pos, side);
|
||||||
// }
|
// }
|
||||||
|
@Override
|
||||||
|
public boolean skipRendering(BlockState state, BlockState adjacentState, Direction side) {
|
||||||
|
return adjacentState.is(this) ? true : super.skipRendering(state, adjacentState, side);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RenderShape getRenderShape(BlockState state) {
|
public RenderShape getRenderShape(BlockState state) {
|
||||||
return RenderShape.INVISIBLE;
|
return RenderShape.MODEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -9,24 +9,24 @@
|
||||||
"from": [1, 1, 1],
|
"from": [1, 1, 1],
|
||||||
"to": [15, 15, 15],
|
"to": [15, 15, 15],
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [1, 1, 15, 15], "texture": "#base"},
|
"north": {"uv": [1, 1, 15, 15], "texture": "#base", "cullface": "north"},
|
||||||
"east": {"uv": [1, 1, 15, 15], "texture": "#base"},
|
"east": {"uv": [1, 1, 15, 15], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [1, 1, 15, 15], "texture": "#base"},
|
"south": {"uv": [1, 1, 15, 15], "texture": "#base", "cullface": "south"},
|
||||||
"west": {"uv": [1, 1, 15, 15], "texture": "#base"},
|
"west": {"uv": [1, 1, 15, 15], "texture": "#base", "cullface": "west"},
|
||||||
"up": {"uv": [1, 1, 15, 15], "texture": "#base"},
|
"up": {"uv": [1, 1, 15, 15], "texture": "#base", "cullface": "up"},
|
||||||
"down": {"uv": [1, 1, 15, 15], "texture": "#base"}
|
"down": {"uv": [1, 1, 15, 15], "texture": "#base", "cullface": "down"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [0, 0, 0],
|
"from": [0, 0, 0],
|
||||||
"to": [16, 1, 1],
|
"to": [16, 1, 1],
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 15, 16, 16], "texture": "#base"},
|
"north": {"uv": [0, 15, 16, 16], "texture": "#base", "cullface": "north"},
|
||||||
"east": {"uv": [0, 15, 1, 16], "texture": "#base"},
|
"east": {"uv": [0, 15, 1, 16], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
"south": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
||||||
"west": {"uv": [15, 15, 16, 16], "texture": "#base"},
|
"west": {"uv": [15, 15, 16, 16], "texture": "#base", "cullface": "west"},
|
||||||
"up": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
"up": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
||||||
"down": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"}
|
"down": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base", "cullface": "down"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 23]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 23]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 15, 16, 16], "texture": "#base"},
|
"north": {"uv": [0, 15, 16, 16], "texture": "#base"},
|
||||||
"east": {"uv": [0, 15, 1, 16], "texture": "#base"},
|
"east": {"uv": [0, 15, 1, 16], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
"south": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base", "cullface": "south"},
|
||||||
"west": {"uv": [15, 15, 16, 16], "texture": "#base"},
|
"west": {"uv": [15, 15, 16, 16], "texture": "#base", "cullface": "west"},
|
||||||
"up": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
"up": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"},
|
||||||
"down": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base"}
|
"down": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#base", "cullface": "down"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -47,11 +47,11 @@
|
||||||
"to": [16, 16, 1],
|
"to": [16, 16, 1],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 16, 1], "texture": "#base"},
|
"north": {"uv": [0, 0, 16, 1], "texture": "#base", "cullface": "north"},
|
||||||
"east": {"uv": [0, 0, 1, 1], "texture": "#base"},
|
"east": {"uv": [0, 0, 1, 1], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"},
|
"south": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"},
|
||||||
"west": {"uv": [15, 0, 16, 1], "texture": "#base"},
|
"west": {"uv": [15, 0, 16, 1], "texture": "#base", "cullface": "west"},
|
||||||
"up": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"},
|
"up": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base", "cullface": "up"},
|
||||||
"down": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"}
|
"down": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -61,10 +61,10 @@
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 23]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 23]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 16, 1], "texture": "#base"},
|
"north": {"uv": [0, 0, 16, 1], "texture": "#base"},
|
||||||
"east": {"uv": [0, 0, 1, 1], "texture": "#base"},
|
"east": {"uv": [0, 0, 1, 1], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"},
|
"south": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base", "cullface": "south"},
|
||||||
"west": {"uv": [15, 0, 16, 1], "texture": "#base"},
|
"west": {"uv": [15, 0, 16, 1], "texture": "#base", "cullface": "west"},
|
||||||
"up": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"},
|
"up": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base", "cullface": "up"},
|
||||||
"down": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"}
|
"down": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#base"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -73,12 +73,10 @@
|
||||||
"to": [1, 1, 15],
|
"to": [1, 1, 15],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"east": {"uv": [1, 15, 15, 16], "rotation": 180, "texture": "#base"},
|
"east": {"uv": [1, 15, 15, 16], "rotation": 180, "texture": "#base"},
|
||||||
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
"west": {"uv": [1, 15, 15, 16], "texture": "#base", "cullface": "west"},
|
||||||
"west": {"uv": [1, 15, 15, 16], "texture": "#base"},
|
|
||||||
"up": {"uv": [1, 15, 15, 16], "rotation": 90, "texture": "#base"},
|
"up": {"uv": [1, 15, 15, 16], "rotation": 90, "texture": "#base"},
|
||||||
"down": {"uv": [1, 15, 15, 16], "rotation": 270, "texture": "#base"}
|
"down": {"uv": [1, 15, 15, 16], "rotation": 270, "texture": "#base", "cullface": "down"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -86,11 +84,9 @@
|
||||||
"to": [1, 16, 15],
|
"to": [1, 16, 15],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 9]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 9]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"east": {"uv": [1, 0, 15, 1], "rotation": 180, "texture": "#base"},
|
"east": {"uv": [1, 0, 15, 1], "rotation": 180, "texture": "#base"},
|
||||||
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
"west": {"uv": [1, 0, 15, 1], "texture": "#base", "cullface": "west"},
|
||||||
"west": {"uv": [1, 0, 15, 1], "texture": "#base"},
|
"up": {"uv": [1, 0, 15, 1], "rotation": 90, "texture": "#base", "cullface": "up"},
|
||||||
"up": {"uv": [1, 0, 15, 1], "rotation": 90, "texture": "#base"},
|
|
||||||
"down": {"uv": [1, 0, 15, 1], "rotation": 270, "texture": "#base"}
|
"down": {"uv": [1, 0, 15, 1], "rotation": 270, "texture": "#base"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -99,12 +95,10 @@
|
||||||
"to": [16, 1, 15],
|
"to": [16, 1, 15],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 9]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 9]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
"east": {"uv": [1, 0, 15, 1], "rotation": 180, "texture": "#base", "cullface": "east"},
|
||||||
"east": {"uv": [1, 0, 15, 1], "rotation": 180, "texture": "#base"},
|
|
||||||
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"west": {"uv": [1, 0, 15, 1], "texture": "#base"},
|
"west": {"uv": [1, 0, 15, 1], "texture": "#base"},
|
||||||
"up": {"uv": [1, 0, 15, 1], "rotation": 90, "texture": "#base"},
|
"up": {"uv": [1, 0, 15, 1], "rotation": 90, "texture": "#base"},
|
||||||
"down": {"uv": [1, 0, 15, 1], "rotation": 270, "texture": "#base"}
|
"down": {"uv": [1, 0, 15, 1], "rotation": 270, "texture": "#base", "cullface": "down"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -112,11 +106,9 @@
|
||||||
"to": [16, 16, 15],
|
"to": [16, 16, 15],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 23, 9]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [23, 23, 9]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
"east": {"uv": [1, 15, 15, 16], "texture": "#base", "cullface": "east"},
|
||||||
"east": {"uv": [1, 15, 15, 16], "texture": "#base"},
|
|
||||||
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"west": {"uv": [1, 15, 15, 16], "rotation": 180, "texture": "#base"},
|
"west": {"uv": [1, 15, 15, 16], "rotation": 180, "texture": "#base"},
|
||||||
"up": {"uv": [1, 15, 15, 16], "rotation": 270, "texture": "#base"},
|
"up": {"uv": [1, 15, 15, 16], "rotation": 270, "texture": "#base", "cullface": "up"},
|
||||||
"down": {"uv": [1, 15, 15, 16], "rotation": 90, "texture": "#base"}
|
"down": {"uv": [1, 15, 15, 16], "rotation": 90, "texture": "#base"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -125,12 +117,10 @@
|
||||||
"to": [1, 15, 1],
|
"to": [1, 15, 1],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"north": {"uv": [15, 1, 16, 15], "texture": "#base", "cullface": "north"},
|
||||||
"east": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"east": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
||||||
"south": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"south": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
||||||
"west": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"west": {"uv": [15, 1, 16, 15], "texture": "#base", "cullface": "west"}
|
||||||
"up": {"uv": [0, 0, 1, 1], "texture": "#base"},
|
|
||||||
"down": {"uv": [0, 0, 1, 1], "texture": "#base"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -140,10 +130,8 @@
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"north": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
||||||
"east": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"east": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
||||||
"south": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"south": {"uv": [0, 1, 1, 15], "texture": "#base", "cullface": "south"},
|
||||||
"west": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"west": {"uv": [0, 1, 1, 15], "texture": "#base", "cullface": "west"}
|
||||||
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -152,11 +140,9 @@
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 23]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 23]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"north": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
||||||
"east": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"east": {"uv": [15, 1, 16, 15], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"south": {"uv": [15, 1, 16, 15], "texture": "#base", "cullface": "south"},
|
||||||
"west": {"uv": [15, 1, 16, 15], "texture": "#base"},
|
"west": {"uv": [15, 1, 16, 15], "texture": "#base"}
|
||||||
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -164,12 +150,10 @@
|
||||||
"to": [16, 15, 1],
|
"to": [16, 15, 1],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"north": {"uv": [0, 1, 1, 15], "texture": "#base", "cullface": "north"},
|
||||||
"east": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"east": {"uv": [0, 1, 1, 15], "texture": "#base", "cullface": "east"},
|
||||||
"south": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"south": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
||||||
"west": {"uv": [0, 1, 1, 15], "texture": "#base"},
|
"west": {"uv": [0, 1, 1, 15], "texture": "#base"}
|
||||||
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
|
||||||
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue