|
2 | 2 |
|
3 | 3 | import com.mojang.serialization.MapCodec; |
4 | 4 | import net.minecraft.core.BlockPos; |
| 5 | +import net.minecraft.core.Direction; |
5 | 6 | import net.minecraft.world.entity.LivingEntity; |
6 | 7 | import net.minecraft.world.item.ItemStack; |
7 | 8 | import net.minecraft.world.item.context.BlockPlaceContext; |
| 9 | +import net.minecraft.world.level.BlockGetter; |
8 | 10 | import net.minecraft.world.level.Level; |
9 | 11 | import net.minecraft.world.level.block.BaseEntityBlock; |
10 | 12 | import net.minecraft.world.level.block.RenderShape; |
|
14 | 16 | import net.minecraft.world.level.block.state.BlockState; |
15 | 17 | import net.minecraft.world.level.levelgen.structure.BoundingBox; |
16 | 18 | import net.minecraft.world.phys.AABB; |
| 19 | +import net.minecraft.world.phys.shapes.CollisionContext; |
| 20 | +import net.minecraft.world.phys.shapes.Shapes; |
| 21 | +import net.minecraft.world.phys.shapes.VoxelShape; |
17 | 22 | import org.jetbrains.annotations.NotNull; |
18 | 23 | import top.ctnstudio.futurefood.api.IEnergyStorager; |
19 | 24 | import top.ctnstudio.futurefood.common.block.tile.QedBlockEntity; |
@@ -100,4 +105,24 @@ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, Block |
100 | 105 | return type == ModTileEntity.QED.get() ? QedBlockEntity::tick : null; |
101 | 106 | } |
102 | 107 |
|
| 108 | + @Override |
| 109 | + protected boolean skipRendering(BlockState state, BlockState adjacentBlockState, Direction side) { |
| 110 | + return adjacentBlockState.is(this) ? true : super.skipRendering(state, adjacentBlockState, side); |
| 111 | + } |
| 112 | + |
| 113 | + @Override |
| 114 | + protected VoxelShape getVisualShape(BlockState p_309057_, BlockGetter p_308936_, BlockPos p_308956_, CollisionContext p_309006_) { |
| 115 | + return Shapes.empty(); |
| 116 | + } |
| 117 | + |
| 118 | + @Override |
| 119 | + protected float getShadeBrightness(BlockState p_308911_, BlockGetter p_308952_, BlockPos p_308918_) { |
| 120 | + return 1.0F; |
| 121 | + } |
| 122 | + |
| 123 | + @Override |
| 124 | + protected boolean propagatesSkylightDown(BlockState p_309084_, BlockGetter p_309133_, BlockPos p_309097_) { |
| 125 | + return true; |
| 126 | + } |
| 127 | + |
103 | 128 | } |
0 commit comments