Somewhat hacky fix for - make sure the dust prefab has a location (or anything at all really), since it may not exist if Core is not enabled.
Better fix would be hardening/extracting particles somewhat so they aren't in the engine yet need something in a module.
@@ -159,9 +159,12 @@ private void commonDestroyed(DoDestroyEvent event, EntityRef entity, Block block
// dust particle effect
if (entity.hasComponent(LocationComponent.class) && block.isDebrisOnDestroy()) {
EntityBuilder dustBuilder = entityManager.newBuilder("core:dustEffect");
+ // TODO: particle system stuff should be split out better - this is effectively a stealth dependency on Core from the engine
+ if (dustBuilder.hasComponent(LocationComponent.class)) {
dustBuilder.getComponent(LocationComponent.class).setWorldPosition(entity.getComponent(LocationComponent.class).getWorldPosition());
dustBuilder.build();
}
+ }
// sound to play for destroyed block
BlockSounds sounds = block.getSounds();
