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

CyclopsMC / IntegratedDynamics / 20210191346

14 Dec 2025 03:32PM UTC coverage: 19.514% (-33.5%) from 53.061%
20210191346

push

github

rubensworks
Remove deprecations

663 of 8728 branches covered (7.6%)

Branch coverage included in aggregate %.

6786 of 29445 relevant lines covered (23.05%)

1.09 hits per line

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

0.0
/src/main/java/org/cyclops/integrateddynamics/gametest/GameTestsAspectsReadEntity.java
1
package org.cyclops.integrateddynamics.gametest;
2

3
import net.minecraft.core.BlockPos;
4
import net.minecraft.core.Direction;
5
import net.minecraft.gametest.framework.GameTestHelper;
6
import net.minecraft.world.entity.EntityType;
7
import net.minecraft.world.entity.animal.Chicken;
8
import net.minecraft.world.entity.animal.Cow;
9
import net.minecraft.world.entity.decoration.ItemFrame;
10
import net.minecraft.world.item.ItemStack;
11
import net.minecraft.world.item.Items;
12
import org.cyclops.cyclopscore.gametest.GameTest;
13
import org.cyclops.integrateddynamics.core.evaluate.variable.ValueObjectTypeEntity;
14
import org.cyclops.integrateddynamics.core.evaluate.variable.ValueObjectTypeItemStack;
15
import org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeInteger;
16
import org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeList;
17
import org.cyclops.integrateddynamics.core.part.PartTypes;
18
import org.cyclops.integrateddynamics.part.aspect.Aspects;
19

20
import java.util.Objects;
21

22
import static org.cyclops.integrateddynamics.gametest.GameTestHelpersIntegratedDynamics.testReadAspect;
23
import static org.cyclops.integrateddynamics.gametest.GameTestHelpersIntegratedDynamics.testReadAspectPredicate;
24

25
public class GameTestsAspectsReadEntity {
×
26

27
    public static final String TEMPLATE_EMPTY = "integrateddynamics:empty10";
28
    public static final BlockPos POS = BlockPos.ZERO.offset(2, 0, 2);
×
29

30
    @GameTest(template = TEMPLATE_EMPTY)
31
    public void testAspectsReadEntityItemFrameRotationInvalid(GameTestHelper helper) {
32
        testReadAspect(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.INTEGER_ITEMFRAMEROTATION, ValueTypeInteger.ValueInteger.of(0));
×
33
    }
×
34

35
    @GameTest(template = TEMPLATE_EMPTY)
36
    public void testAspectsReadEntityItemFrameRotationValid(GameTestHelper helper) {
37
        ItemFrame itemFrame = helper.spawn(EntityType.ITEM_FRAME, POS.west());
×
38
        itemFrame.setRotation(3);
×
39
        itemFrame.setYRot(Direction.WEST.toYRot());
×
40
        testReadAspect(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.INTEGER_ITEMFRAMEROTATION, ValueTypeInteger.ValueInteger.of(3));
×
41
    }
×
42

43
    @GameTest(template = TEMPLATE_EMPTY)
44
    public void testAspectsReadEntityItemFrameContentsInvalid(GameTestHelper helper) {
45
        testReadAspect(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.ITEMSTACK_ITEMFRAMECONTENTS, ValueObjectTypeItemStack.ValueItemStack.of(ItemStack.EMPTY));
×
46
    }
×
47

48
    @GameTest(template = TEMPLATE_EMPTY)
49
    public void testAspectsReadEntityItemFrameContentsValid(GameTestHelper helper) {
50
        ItemFrame itemFrame = helper.spawn(EntityType.ITEM_FRAME, POS.west());
×
51
        itemFrame.setItem(new ItemStack(Items.COAL));
×
52
        itemFrame.setYRot(Direction.WEST.toYRot());
×
53
        testReadAspect(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.ITEMSTACK_ITEMFRAMECONTENTS, ValueObjectTypeItemStack.ValueItemStack.of(new ItemStack(Items.COAL)));
×
54
    }
×
55

56
    @GameTest(template = TEMPLATE_EMPTY)
57
    public void testAspectsReadEntityEntities(GameTestHelper helper) {
58
        Cow cow = helper.spawn(EntityType.COW, POS.west());
×
59
        Chicken chicken = helper.spawn(EntityType.CHICKEN, POS.west());
×
60
        testReadAspect(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.LIST_ENTITIES, ValueTypeList.ValueList.ofAll(
×
61
                ValueObjectTypeEntity.ValueEntity.of(cow),
×
62
                ValueObjectTypeEntity.ValueEntity.of(chicken)
×
63
        ));
64
    }
×
65

66
    @GameTest(template = TEMPLATE_EMPTY)
67
    public void testAspectsReadEntityEntity(GameTestHelper helper) {
68
        Cow cow = helper.spawn(EntityType.COW, POS.west());
×
69
        testReadAspect(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.ENTITY, ValueObjectTypeEntity.ValueEntity.of(cow));
×
70
    }
×
71

72
    @GameTest(template = TEMPLATE_EMPTY)
73
    public void testAspectsReadEntityPlayers(GameTestHelper helper) {
74
        testReadAspectPredicate(POS, helper, PartTypes.ENTITY_READER, Aspects.Read.Entity.LIST_PLAYERS, Objects::nonNull);
×
75
    }
×
76

77
}
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