package electrosphere.entity.state.equip; import static org.junit.jupiter.api.Assertions.assertNotNull; import org.joml.Vector3d; import org.junit.jupiter.api.Disabled; import annotations.IntegrationTest; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.state.inventory.InventoryUtils; import electrosphere.entity.types.creature.CreatureTemplate; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; import template.EntityTestTemplate; import testutils.TestEngineUtils; /** * Server equip state tests */ public class ServerEquipStateTests extends EntityTestTemplate { @Disabled @IntegrationTest public void spawningWithEquippedItem(){ TestEngineUtils.simulateFrames(1); //spawn entities CreatureTemplate creatureTemplate = CreatureTemplate.createDefault("human"); Entity creature = CreatureUtils.serverSpawnBasicCreature(Globals.realmManager.first(), new Vector3d(0,0,0), "human", creatureTemplate); Entity katana = ItemUtils.serverSpawnBasicItem(Globals.realmManager.first(), new Vector3d(0,0,0), "katana2H"); //equip Entity inInventoryItem = InventoryUtils.serverAttemptStoreItem(creature, katana); ServerEquipState serverEquipState = ServerEquipState.getServerEquipState(creature); serverEquipState.commandAttemptEquip(inInventoryItem, serverEquipState.getEquipPoint("handsCombined")); //verify was equipped assertNotNull(serverEquipState.getEquippedItemAtPoint("handsCombined")); } }