Log warning when item with no block family encountered
package org.terasology.logic.inventory;
import com.bulletphysics.collision.shapes.BoxShape;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.terasology.engine.Time;
import org.terasology.entitySystem.Component;
import org.terasology.entitySystem.entity.EntityRef;
*/
@RegisterSystem(RegisterMode.AUTHORITY)
public class ItemPickupAuthoritySystem extends BaseComponentSystem {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ItemPickupAuthoritySystem.class);
+
@In
private EntitySystemLibrary library;
@@ -91,6 +95,7 @@ public void updateExtentsOnBlockItemBoxShape(OnAddedComponent event, EntityRef i
BlockFamily blockFamily = blockItemComponent.blockFamily;
if (blockFamily == null) {
+ LOGGER.warn("Prefab " + itemEntity.getParentPrefab().getName() + " does not have a block family");
return;
}
