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

CyclopsMC / IntegratedDynamics / 16552051255

27 Jul 2025 01:58PM UTC coverage: 53.206% (+8.0%) from 45.161%
16552051255

push

github

rubensworks
Resolve minor TODOs

2888 of 8740 branches covered (33.04%)

Branch coverage included in aggregate %.

17341 of 29280 relevant lines covered (59.22%)

3.08 hits per line

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

7.41
/src/main/java/org/cyclops/integrateddynamics/block/BlockFluidLiquidChorus.java
1
package org.cyclops.integrateddynamics.block;
2

3
import net.minecraft.core.BlockPos;
4
import net.minecraft.sounds.SoundEvents;
5
import net.minecraft.sounds.SoundSource;
6
import net.minecraft.util.Mth;
7
import net.minecraft.world.entity.Entity;
8
import net.minecraft.world.entity.InsideBlockEffectApplier;
9
import net.minecraft.world.entity.LivingEntity;
10
import net.minecraft.world.level.Level;
11
import net.minecraft.world.level.block.Block;
12
import net.minecraft.world.level.block.LiquidBlock;
13
import net.minecraft.world.level.block.state.BlockState;
14
import org.cyclops.integrateddynamics.RegistryEntries;
15

16
/**
17
 * A block for the Liquid Chorus fluid.
18
 * @author rubensworks
19
 */
20
public class BlockFluidLiquidChorus extends LiquidBlock {
21

22
    public BlockFluidLiquidChorus(Block.Properties builder) {
23
        super(RegistryEntries.FLUID_LIQUID_CHORUS.get(), builder);
6✔
24
    }
1✔
25

26
    @Override
27
    protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier) {
28
        super.entityInside(state, level, pos, entity, effectApplier);
×
29

30
        // Simulate chorus-eating
31
        if (entity instanceof LivingEntity) {
×
32
            LivingEntity entityLiving = (LivingEntity) entity;
×
33
            double d0 = entityLiving.getX();
×
34
            double d1 = entityLiving.getY();
×
35
            double d2 = entityLiving.getZ();
×
36

37
            for (int i = 0; i < 16; ++i) {
×
38
                double d3 = entityLiving.getX() + (entityLiving.getRandom().nextDouble() - 0.5D) * 16.0D;
×
39
                double d4 = Mth.clamp(entityLiving.getY() + (double) (entityLiving.getRandom().nextInt(16) - 8), 0.0D, level.getMaxY());
×
40
                double d5 = entityLiving.getZ() + (entityLiving.getRandom().nextDouble() - 0.5D) * 16.0D;
×
41

42
                if (entityLiving.isPassenger()) {
×
43
                    entityLiving.stopRiding();
×
44
                }
45

46
                if (entityLiving.randomTeleport(d3, d4, d5, true)) {
×
47
                    level.playSound(null, d0, d1, d2, SoundEvents.CHORUS_FRUIT_TELEPORT, SoundSource.PLAYERS, 1.0F, 1.0F);
×
48
                    entityLiving.playSound(SoundEvents.CHORUS_FRUIT_TELEPORT, 1.0F, 1.0F);
×
49
                    break;
×
50
                }
51
            }
52
        }
53
    }
×
54
}
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