public override void GetBlockInfo(IPlayer forPlayer, StringBuilder dsc) { base.GetBlockInfo(forPlayer, dsc); if (!BucketSlot.Empty) { BlockLiquidContainerBase block = BucketSlot.Itemstack.Collectible as BlockLiquidContainerBase; dsc.Append("Bucket: "); block.GetContentInfo(BucketSlot, dsc, Api.World); } }
public override string GetPlacedBlockInfo(IWorldAccessor world, BlockPos pos, IPlayer forPlayer) { StringBuilder dsc = new StringBuilder(); dsc.AppendLine(base.GetPlacedBlockInfo(world, pos, forPlayer)); BlockEntityCondenser be = world.BlockAccessor.GetBlockEntity(pos) as BlockEntityCondenser; if (be?.Inventory[1].Empty == false) { BlockLiquidContainerBase block = be.Inventory[1].Itemstack.Collectible as BlockLiquidContainerBase; dsc.Append("Bucket: "); block.GetContentInfo(be.Inventory[1], dsc, world); } return(dsc.ToString()); }