Search in sources :

Example 41 with StringComponent

use of org.terasology.unittest.stubs.StringComponent in project Terasology by MovingBlocks.

the class EntityAwareWorldProviderTest method createPrefabWithString.

private Prefab createPrefabWithString(String urn, String text, AssetManager assetManager) {
    PrefabData prefabData = new PrefabData();
    prefabData.addComponent(new StringComponent(text));
    return assetManager.loadAsset(new ResourceUrn(urn), prefabData, Prefab.class);
}
Also used : PrefabData(org.terasology.engine.entitySystem.prefab.PrefabData) StringComponent(org.terasology.unittest.stubs.StringComponent) ResourceUrn(org.terasology.gestalt.assets.ResourceUrn)

Aggregations

StringComponent (org.terasology.unittest.stubs.StringComponent)41 Test (org.junit.jupiter.api.Test)38 EntityRef (org.terasology.engine.entitySystem.entity.EntityRef)22 EntityData (org.terasology.protobuf.EntityData)8 IntegerComponent (org.terasology.unittest.stubs.IntegerComponent)8 EventSystem (org.terasology.engine.entitySystem.event.internal.EventSystem)5 ResourceUrn (org.terasology.gestalt.assets.ResourceUrn)5 PrefabData (org.terasology.engine.entitySystem.prefab.PrefabData)4 Prefab (org.terasology.engine.entitySystem.prefab.Prefab)3 PojoPrefab (org.terasology.engine.entitySystem.prefab.internal.PojoPrefab)3 Vector3i (org.joml.Vector3i)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2 EngineEntityManager (org.terasology.engine.entitySystem.entity.internal.EngineEntityManager)2 NetworkSystem (org.terasology.engine.network.NetworkSystem)2 Component (org.terasology.gestalt.entitysystem.component.Component)2 GetterSetterComponent (org.terasology.unittest.stubs.GetterSetterComponent)2 Map (java.util.Map)1 Reflections (org.reflections.Reflections)1 StorageManager (org.terasology.engine.persistence.StorageManager)1 EntitySerializer (org.terasology.engine.persistence.serializers.EntitySerializer)1