• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CyclopsMC / IntegratedDynamics / 22182377337

19 Feb 2026 12:46PM UTC coverage: 44.49% (-1.7%) from 46.183%
22182377337

push

github

rubensworks
Fix performance workflow failing

2663 of 8850 branches covered (30.09%)

Branch coverage included in aggregate %.

12028 of 24171 relevant lines covered (49.76%)

2.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.33
/src/main/java/org/cyclops/integrateddynamics/block/BlockInvisibleLight.java
1
package org.cyclops.integrateddynamics.block;
2

3
import net.minecraft.core.BlockPos;
4
import net.minecraft.world.item.context.BlockPlaceContext;
5
import net.minecraft.world.level.BlockGetter;
6
import net.minecraft.world.level.block.Block;
7
import net.minecraft.world.level.block.RenderShape;
8
import net.minecraft.world.level.block.state.BlockState;
9
import net.minecraft.world.level.block.state.StateDefinition;
10
import net.minecraft.world.level.block.state.properties.IntegerProperty;
11
import net.minecraft.world.phys.shapes.CollisionContext;
12
import net.minecraft.world.phys.shapes.Shapes;
13
import net.minecraft.world.phys.shapes.VoxelShape;
14

15
/**
16
 * An invisible light source with variable intensity.
17
 * @author rubensworks
18
 */
19
public class BlockInvisibleLight extends Block {
20

21
    public static final IntegerProperty LIGHT = IntegerProperty.create("light", 0, 15);
6✔
22

23
    public BlockInvisibleLight(Properties properties) {
24
        super(properties);
3✔
25

26
        this.registerDefaultState(this.stateDefinition.any()
8✔
27
                .setValue(LIGHT, 0));
3✔
28
    }
1✔
29

30
    @Override
31
    protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
32
        builder.add(LIGHT);
9✔
33
    }
1✔
34

35
    @SuppressWarnings("deprecation")
36
    @Override
37
    public RenderShape getRenderShape(BlockState blockState) {
38
        return RenderShape.INVISIBLE;
×
39
    }
40

41
    @Override
42
    public boolean canBeReplaced(BlockState blockState, BlockPlaceContext blockItemUseContext) {
43
        return true;
×
44
    }
45

46
    @Override
47
    public VoxelShape getShape(BlockState p_220053_1_, BlockGetter p_220053_2_, BlockPos p_220053_3_, CollisionContext p_220053_4_) {
48
        return Shapes.empty();
2✔
49
    }
50

51
    @Override
52
    public int getLightEmission(BlockState state, BlockGetter world, BlockPos pos) {
53
        if (state.getBlock() == this) {
×
54
            return state.getValue(LIGHT);
×
55
        }
56
        return super.getLightEmission(state, world, pos);
×
57
    }
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc