Fixed Greenhouse glass being invisible

This commit is contained in:
YarinQuapi 2022-02-24 18:34:33 +02:00
parent ec2606f470
commit 65fd73854e
2 changed files with 1 additions and 19 deletions

View file

@ -80,6 +80,7 @@ public class ActuallyAdditionsClient {
RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.get(), RenderType.translucent()); RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.get(), RenderType.translucent());
RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.getFlowing(), RenderType.translucent()); RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.getFlowing(), RenderType.translucent());
RenderTypeLookup.setRenderLayer(ActuallyBlocks.GREENHOUSE_GLASS.get(), RenderType.cutoutMipped());
RenderTypeLookup.setRenderLayer(ActuallyBlocks.CANOLA.get(), RenderType.cutout()); RenderTypeLookup.setRenderLayer(ActuallyBlocks.CANOLA.get(), RenderType.cutout());
RenderTypeLookup.setRenderLayer(ActuallyBlocks.RICE.get(), RenderType.cutout()); RenderTypeLookup.setRenderLayer(ActuallyBlocks.RICE.get(), RenderType.cutout());
RenderTypeLookup.setRenderLayer(ActuallyBlocks.FLAX.get(), RenderType.cutout()); RenderTypeLookup.setRenderLayer(ActuallyBlocks.FLAX.get(), RenderType.cutout());

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod.blocks; 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.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.IGrowable; import net.minecraft.block.IGrowable;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
@ -30,24 +29,6 @@ public class BlockGreenhouseGlass extends BlockBase {
super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).randomTicks()); super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).randomTicks());
} }
// TODO: [port] figure this out
// @Override
// @Deprecated
// @OnlyIn(Dist.CLIENT)
// public boolean shouldSideBeRendered(BlockState state, IBlockAccess world, BlockPos pos, Direction side) {
// BlockState otherState = world.getBlockState(pos.offset(side));
// Block block = otherState.getBlock();
//
// return state != otherState || block != this && super.shouldSideBeRendered(state, world, pos, side);
// }
@Override
public BlockRenderType getRenderShape(BlockState state) {
return BlockRenderType.INVISIBLE;
}
@Override @Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) {
if (world.isClientSide) { if (world.isClientSide) {