@Test public void testAddEntity() { init(); TestingNPC npc1 = new TestingNPC(); TestingNPC npc2 = new TestingNPC(); world.addEntity(npc1); world.addEntity(npc2); world.gameLoop(1); assert (world.getAllEntities().size() == 2); assert (world.getAllEntities().contains(npc1)); assert (world.getAllEntities().contains(npc2)); }
public void addEntity(Entity entity) { newEntities.add(entity); }
World { public void addEntity(Entity entity) { newEntities.add(entity); } }
World { public void addEntity(Entity entity) { newEntities.add(entity); } World(); }
World { public void addEntity(Entity entity) { newEntities.add(entity); } World(); static World getInstance(); void setEntityRenderDistance(int entityRenderDistance); int getEntityRenderDistance(); void setGlobalLightLevel(int lightLevel); int getGlobalLightLevel(); void addTerrainWaveform(Waveform waveform); void addCaveWaveform(Waveform waveform); boolean isChunkGenerationEnabled(); boolean isRandomSeedEnabled(); void setRandomSeedEnabled(boolean randomSeedEnabled); static int getMapSeed(); void setTiles(WorldTiles tileTemplate); void resetTiles(); void resetWorld(); void debugReset(); void setLighting(boolean lightingState); boolean getLightingState(); void initMulti(); void setDifficulty(Difficulty option); void toggleHitboxes(); boolean renderHitboxes(); void addEntity(Entity entity); void deleteEntity(Entity entity); void addIngameText(IngameText ingameText); List<IngameText> getIngameTexts(); void setPlayerText(IngameText ingameText); IngameText getPlayerText(); Debug getDebug(); List<Entity> getAllEntities(); List<Entity> getNpcEntities(); List<Entity> getMountEntities(); List<Decoration> getDecorationEntities(); List<ItemEntity> getItemEntities(); List<Player> getPlayerEntities(); List<TerrainEntity> getTerrainEntities(); long getFps(); WorldTiles getTiles(); boolean isGameOver(); void loadAroundPlayer(Player player); void gameLoop(long ms); void gameLoopMulti(long ms); void setLightning(boolean input); void loadPlayer(ExportablePlayer ep); void loadEntities(List<ExportableEntity> ee); boolean getSkillTreeScreen(); double getDifficulty(); boolean isNpcGenEnabled(); void toggleNpcGen(); void setNpcGenEnabled(boolean npcGenEnabled); void setLightGenEnabled(boolean enabled); boolean isDecoGenEnabled(); void setDecoGenEnabled(boolean enabled); boolean isBuildingGenEnabled(); void setBuildingGenEnabled(boolean enabled); boolean isTotemGenEnabled(); void setTotemGenEnabled(boolean enabled); CoasterClient getClient(); void setClient(CoasterClient client); User getUser(); void setUser(User user); Player getFirstPlayer(); void setTutorialMode(boolean tutorialMode); boolean getTutorialMode(); void setTerrainDestruction(boolean input); boolean getTerrainDestructionMode(); static WorldTiles getTutorialWorld(); WorldTiles getMultiWorld(); void checkDecorations(); boolean getDestructionShadowUpdate(); void setDestructionShadowUpdate(boolean update); static void handleEnterRoom(); }
World { public void addEntity(Entity entity) { newEntities.add(entity); } World(); static World getInstance(); void setEntityRenderDistance(int entityRenderDistance); int getEntityRenderDistance(); void setGlobalLightLevel(int lightLevel); int getGlobalLightLevel(); void addTerrainWaveform(Waveform waveform); void addCaveWaveform(Waveform waveform); boolean isChunkGenerationEnabled(); boolean isRandomSeedEnabled(); void setRandomSeedEnabled(boolean randomSeedEnabled); static int getMapSeed(); void setTiles(WorldTiles tileTemplate); void resetTiles(); void resetWorld(); void debugReset(); void setLighting(boolean lightingState); boolean getLightingState(); void initMulti(); void setDifficulty(Difficulty option); void toggleHitboxes(); boolean renderHitboxes(); void addEntity(Entity entity); void deleteEntity(Entity entity); void addIngameText(IngameText ingameText); List<IngameText> getIngameTexts(); void setPlayerText(IngameText ingameText); IngameText getPlayerText(); Debug getDebug(); List<Entity> getAllEntities(); List<Entity> getNpcEntities(); List<Entity> getMountEntities(); List<Decoration> getDecorationEntities(); List<ItemEntity> getItemEntities(); List<Player> getPlayerEntities(); List<TerrainEntity> getTerrainEntities(); long getFps(); WorldTiles getTiles(); boolean isGameOver(); void loadAroundPlayer(Player player); void gameLoop(long ms); void gameLoopMulti(long ms); void setLightning(boolean input); void loadPlayer(ExportablePlayer ep); void loadEntities(List<ExportableEntity> ee); boolean getSkillTreeScreen(); double getDifficulty(); boolean isNpcGenEnabled(); void toggleNpcGen(); void setNpcGenEnabled(boolean npcGenEnabled); void setLightGenEnabled(boolean enabled); boolean isDecoGenEnabled(); void setDecoGenEnabled(boolean enabled); boolean isBuildingGenEnabled(); void setBuildingGenEnabled(boolean enabled); boolean isTotemGenEnabled(); void setTotemGenEnabled(boolean enabled); CoasterClient getClient(); void setClient(CoasterClient client); User getUser(); void setUser(User user); Player getFirstPlayer(); void setTutorialMode(boolean tutorialMode); boolean getTutorialMode(); void setTerrainDestruction(boolean input); boolean getTerrainDestructionMode(); static WorldTiles getTutorialWorld(); WorldTiles getMultiWorld(); void checkDecorations(); boolean getDestructionShadowUpdate(); void setDestructionShadowUpdate(boolean update); static void handleEnterRoom();  }