public virtual string GetBlockName() { var props = StorageProps; if (props == null || inventory.Empty) { return("Empty pile"); } string[] contentSummary = getContentSummary(); if (contentSummary.Length == 1) { var firstSlot = inventory.FirstNonEmptySlot; ItemStack stack = firstSlot.Itemstack; int sumQ = inventory.Sum(s => s.StackSize); if (firstSlot.Itemstack.Collectible is IContainedCustomName ccn) { string name = ccn.GetContainedName(firstSlot, sumQ); if (name != null) { return(name); } } if (sumQ == 1) { return(stack.GetName()); } return(contentSummary[0]); } return(Lang.Get("Ground Storage")); }